To store Boost graph object in a file
Hi, I have to store Boost Graph object in a text file and later read it and compare it with other graph. If any one have an idea or implementation please share it. It will be save my time. Thanks in advance. Best Regards YASIN *Always have your stuff when you need it with @Dropbox. 2GB account is free! http://db.tt/xOEJ2Ag*
On Wednesday, 18. May 2011 14:31:15 Amanullah Yasin wrote:
Hi,
Hi,
I have to store Boost Graph object in a text file and later read it and compare it with other graph.
If any one have an idea or implementation please share it. It will be save my time.
You could have a look at the serialization library of boost. This enables to store and load an adjacency_list<...> as text or even binary (maybe even other types).
Thanks in advance.
Best Regards
YASIN
*Always have your stuff when you need it with @Dropbox. 2GB account is free! http://db.tt/xOEJ2Ag*
Best, Cedric
On Wednesday 18 May 2011 14:31:15 you wrote:
Hi,
I have to store Boost Graph object in a text file and later read it and compare it with other graph.
If any one have an idea or implementation please share it. It will be save my time.
Thanks in advance.
Best Regards
YASIN
*Always have your stuff when you need it with @Dropbox. 2GB account is free! http://db.tt/xOEJ2Ag*
Hi, Did you have a look at "Graph Input/Output" in the boost graph documentation (http://www.boost.org/doc/libs/1_46_1/libs/graph/doc/table_of_contents.html)? There are methods read_graphml and write_graphml, which read and write graphml files. Furthermore, there is the possibility to use read_graphviz and write_graphviz, which are capable of reading and writing graphviz files. Both graphml and graphviz are human-readable representations of the graph object. Properties (of edges, vertices or the graph as a whole) can also be handled by those methods. Cheers Tobias
participants (3)
-
Amanullah Yasin
-
Cedric Laczny
-
Tobias Columbus