|
Boost Users : |
From: Jeremy Siek (jsiek_at_[hidden])
Date: 2002-06-06 14:22:53
Hello,
You can't use your own vertex and edge classes with the adjacency_list
class, however you can add extra data to the vertices and edges using
internal properties. Page 52 of the BGL book has an explanation and
examples.
Also, of course you can create you own graph structure and then implement
the BGL interface. Then all the BGL algorithms will work with your graph.
You might find Chapter 10 of the BGL book helpful in doing this.
Cheers,
Jeremy
On Wed, 5 Jun 2002, ¹Ú±â¼ö wrote:
yg-boo> for example,
yg-boo>
yg-boo> class Node
yg-boo> {
yg-boo> public:
yg-boo> int m_id;
yg-boo> };
yg-boo>
yg-boo> class Edge
yg-boo> {
yg-boo> public:
yg-boo> int from_node_id;
yg-boo> int to_node_id;
yg-boo> };
yg-boo>
yg-boo> How can I use this class to make graph?
yg-boo> many examples show only integer id graph..
yg-boo>
yg-boo> thanks in advance
yg-boo>
----------------------------------------------------------------------
Jeremy Siek http://php.indiana.edu/~jsiek/
Ph.D. Student, Indiana Univ. B'ton email: jsiek_at_[hidden]
C++ Booster (http://www.boost.org) office phone: (812) 855-3608
----------------------------------------------------------------------
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net