Boost logo

Boost Users :

Subject: Re: [Boost-users] [BGL] Is it possible to control algorithm's behavior by visitor?
From: Li Ning (Ning.c.Li_at_[hidden])
Date: 2009-05-21 04:11:43


For example, a graph's edge have 2 property: weight & capacity. I need to
compute a path which have min weight and any edges in this path has bigger
capacity than 'x'.

Seems BGL can't do this uniformly because shortest_path function has no
place to accept others parameter(constraints). Some functors such as
distance_compare seems only work on weight.

More step, a undirected graph with special edge which has 2 separated
capacity. One for source--->target, other for target---->source. If a path
go through this edge from edge's source vertex to target vertex, capacity of
"source--->target" will decrease. (note undirected graph edge has no
direction but it still has source & target vertex). The usage of capacity is
ruled by identity of edge's direction and path's direction.
I mean BGL cope with pure graph theory problem nicely, but when the
application gets complex(still can be reduced to pure graph data structure,
but more rules restricted on algorithm), BGL fails.

Am I right?

-- 
View this message in context: http://www.nabble.com/-BGL--Is-it-possible-to-control-algorithm%27s-behavior-by-visitor--tp23648334p23649410.html
Sent from the Boost - Users mailing list archive at Nabble.com.

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