How can I initialize a vertex in PowerGraph?

User 2063 | 9/6/2015, 8:17:13 AM

Hi, I want to initialize just one vertex with a certain value, and I have found a function "transform_vertices ", but it makes modifications to the data on every vertex in graph. I know a method using message. Is there any way to do it rather than message? Thanks

Comments

User 1592 | 9/7/2015, 8:31:18 AM

You can follow the example here: https://github.com/dato-code/PowerGraph/blob/18c21033d77208cedac7661e4fcf35698abb4021/apps/labelpropagation/labelpropagation.cpp#L55-L74 Assuming you like to initialize a vertex only once, you can simply generate the graph and use the function call add_vertex to configure the vertex information while generating the graph.