Boost logo

Boost Users :

From: Salvatore Domenick Desiano (sal_at_[hidden])
Date: 2007-11-28 19:25:16


While looking for information about something else, I found a note under
"known problems" which states that subgraph can't work unless the vertex
descriptor is a vector (this is approximately true -- see the note for
more information).

For other cases, I've found workarounds that allow me to jam the index
into the algorithm (by passing the address of the member). So, for now
I'm not stuck, but I'd still be interested to know if there is a way to
make a graph with bundled properties that isn't a "second class
citizen."

-- Sal

P.S. my actual vertex type is listS; setS was a typo.

smile

--------------
  Salvatore Domenick Desiano
    Doctoral Candidate
      Robotics Institute
        Carnegie Mellon University

On Wed, 28 Nov 2007, Salvatore Domenick Desiano wrote:

o After several hours of reading the newsgroups and working backward through BGL
o header files, I've accepted that I need help.
o
o I have a graph with bundled properties. The edge properties include and index.
o I can't, for the life of me, figure out one thing:
o
o How do I get algorithms (e.g., those in subgraph) to see the edge
o index as a edge_index_t property?
o
o My code is fairly simple (though my failed attempts at getting subgraph, et
o al, to find the edge index have been long). Formatted for brevity:
o
o struct _Vertex_Data { unsigned index; unsigned blob_id; };
o struct _Edge_Data { unsigned index; unsigned count; };
o typedef adjacency_list<setS,setS,undirectedS,_Vertex_Data,_Edge_Data>
o _BGL_Graph_Base;
o struct _Graph_Base : public _BGL_Graph_Base
o {
o typedef my_graph_tag graph_tag;
o };
o typedef subgraph<_Graph_Base> _Graph;
o
o my_graph_tag is left over from a previous attempt, but I suspect it will be
o required to get this to work. I've tried overloading the property selectors,
o but I keep hitting a wall.
o
o I have seen ways to do this with the older property structure, but my bundled
o properties will eventually be elaborate, so I'd like to use this mechanism.
o
o I hope the BGL gurus are still around... the "classic" e-mails seem old...
o
o Thank you for your time and help.
o
o -- Sal
o smile.
o
o


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