Boost logo

Boost :

From: Fabian Buske (fbuske_at_[hidden])
Date: 2005-08-06 15:31:33


I'm trying to write a dijkstra visitor, that sets the weight of an egde
to the
maximum value after assigning it to a minimum spanning tree.

The visitor is created according to the bacon sample:

  template <typename WeightMap>
        class special_dijkstra_visitor
    : public boost::default_dijkstra_visitor


                template <typename Edge, typename Graph>
                void edge_relaxed(Edge e, Graph& g)
                        weight_map_[e] = DBL_MAX;

                template <class Edge, class Graph>
                void edge_not_relaxed(Edge e, Graph& g)
                        weight_map_[e] = DBL_MAX;

                WeightMap weight_map_;


        // Convenience function
  template <typename WeightMap>
  visit_special_dijkstra(WeightMap w)
    return special_dijkstra_visitor<WeightMap>(w);

The graph based on an adjacency matrix with property<edge_weight_t, double>

The visitor is called by:
property_map<Graph, edge_weight_t>::type weightmap = get(edge_weight, g);
prim_minimum_spanning_tree(g, root, &p[0], distance, weightmap, indexmap,

The linux gnu 3.4.4 compiler gives the following error messages
*snip template instance error messages*
error: `
   edge_relaxed' undeclared (first use this function)
error: `
   edge_not_relaxed' undeclared (first use this function)
error: `
   finish_vertex' undeclared (first use this function)

I'm wondering, cause I thought deriving from default_dijkstra_visitor
ensures that finish_vertex is allready implemented.

Compiling the bacon sample on the same graph works fine. So I'm really
Any hints for debugging the code?

Thanks a lot.


Boost list run by bdawes at, gregod at, cpdaniel at, john at