Boost logo

Boost Users :

From: Matthias Kronenberger (yg-boost-users_at_[hidden])
Date: 2002-06-06 04:14:41

1. How to create a subgraph from a given simple boost graph type?
2. Why are modell subgraph not the same concept as the underlying graph
type? Why are not all non-member function defined for the only graph modell
adjacence_list<> also available for subgraph?

I've defined something like

class NG {

 typedef boost::property<boost::vertex_all_t, SomeIterator, Vertex_Property
> vertex_SPIterator_Prop; // GridSP_type::iterator

 typedef Default::Graph<vertex_SPIterator_Prop,
Edge_Property>::Subgraph::Undirected Graph;


struct Default {
 template<class VertexProperties=boost::no_property, class
EdgeProperties=boost::no_property, class GraphProperties=boost::no_property,
class EdgeList=boost::hash_setS, class VertexList=boost::listS >
 struct Graph {
  struct Subgraph {
   typedef typename boost::subgraph < boost::adjacency_list<EdgeList,
VertexList, boost::undirectedS, boost::property<boost::vertex_index_t,int,
VertexProperties>, boost::property<boost::edge_index_t, int, EdgeProperties
> ,GraphProperties> > Undirected;

and then i'm doing somewhere else
    vertex_descriptor v=boost::add_vertex( theGraph);
    IteratorMap[Prop ] =v;
    boost::put( boost::vertex_all_t() , theGraph, v, Prop);
    return v;

I get a nice error with MSVC 6.5
d:\matthias\programmieren\boost\boost\graph\subgraph.hpp(751): error C2679:
Binaerer Operator '=': Kein Operator definiert, der einen rechtsseitigen
Operator vom Typ 'const _Ht_iter<pair<int

(no operator= defined for the type conversion used in put pmap[k] =

But using a simple adjacence_list<..> instead of the subgraph<
adjacence_list<...> this mess compiles fine.

What am i doing wrong?
Are there better ways to create a property map containing (const)
iterators, that don't modell STL::RandomAccesIterator?


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at