Boost logo

Boost Users :

From: Doug Gregor (dgregor_at_[hidden])
Date: 2007-09-20 10:52:24


On Sep 20, 2007, at 6:59 AM, tonyaim83 wrote:
> I want to calculate diameter and girth of a graph using BGL so i m
> taking
>
> http://www.cs.ualberta.ca/~ghali/courses/texts/BGL/html/
> girth.cpp.html#pred_t.54
> as a reference.
> I have already created graph using adjacency_list
>
> Now i m not able to understand how to use :-
>
> typedef boost::v_property<long> dist_t;
> boost::property_map<Graph*, dist_t>::type d_map;
>
> typedef boost::u_property<vertex_descriptor> pred_t;
> boost::property_map<Graph*, pred_t>::type p_map;

Those are Stanford GraphBase-specific property maps. You can create
your own property maps from the adjacency_list; see http://
www.boost.org/libs/graph/doc/using_property_maps.html

> Is there any alternative to calculate diameter and girth

We don't have these functions in the BGL at this time.

        - Doug


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