Hi,
I'm wondering if defining a graph as a
pointer-linked vertex list is compatible with the
subgraph paradigm.
Presumably, an adjacency list having its vertex
descriptor defined as a pointer to a vertex object
would fulfil our needs. But how this technique would
behave when we deal with a subgraph having local
vertex descriptors?
--- Jeremy Siek
hjoly2> Hi, hjoly2> I'd like to know if it's possible to create a BGL hjoly2> graph that uses custom-made classes for the nodes and hjoly2> the edges.
The answer is yes and no.
You can't use your own vertex and edge classes. However, you can tell adjacency_list to store extra stuff of your choosing with each vertex and edge, that is, using internal properties.
hjoly2> While looking to your documentation, I came across hjoly2> the following: hjoly2> hjoly2> "Many graph representations (such as adjacency lists) hjoly2> do not store actual vertex objects, while others do hjoly2> (e.g., pointer-linked graphs)." (c.f. hjoly2> boost-1.30.2/libs/graph/doc/quick_tour.html) hjoly2> hjoly2> Is the pointer-linked graph implementation supplied hjoly2> from boost or do I have to create one and use external hjoly2> adaptation for using it with your library?
You can use internal properties with adjacency_list. Also, depending on which parameters you pick for adjacency_list, you'll got pointer-linked out-edge lists (OutEdgeList=listS) or pointer-linked vertex lists (VertexList=listS). Check out the docs here:
http://www.boost.org/libs/graph/doc/adjacency_list.html
or the BGL book.
Cheers, Jeremy
----------------------------------------------------------------------
Jeremy Siek http://php.indiana.edu/~jsiek/ Ph.D. Student, Indiana Univ. B'ton email: jsiek@osl.iu.edu C++ Booster (http://www.boost.org) office phone: (812) 856-1820
----------------------------------------------------------------------
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users __________________________________________________________ Lèche-vitrine ou lèche-écran ? magasinage.yahoo.ca