| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Unfortunately I have not written a program to initialize vertex values. It is quite easy though:
So basically following program should do the trick (assuming your vertex-datatype is int):
std::string filename = filename_vertex_data<int>("mygraph")
FILE* f = fopen(filename.c_str(), "w");
for(int i=0; i<numvertices; i++) {
int value = vertex_value_of(i); // TODO
fwrite(&value, sizeof(int), 1, f);
}
fclose(f);
This is not the fastest way to do it, but probably fast enough.
In the Java-version, you can define vertex values by defining a self-edge in the edge list input format.
| Back | FazBrowse Home | New Git URL |