|
Boost Users : |
Subject: [Boost-users] [graph] dijkstra additional constrains that will stop the search (ex. distance from source)
From: The Maschine (justthemaschine_at_[hidden])
Date: 2013-04-16 09:54:54
Hi all,
I've been reading around the list (Ill post examples below) but I dont
really know how to implement the thing below.
I want the search to be able to stop based on some "value" or "result
of a function". For example, every node has a "length" value in a
custom "struct VertexProperties".
How is it possible for dijkstra_shortest_paths to only consider nodes
that are inside a radius from the source? Everything else should be
considered as 'unconnected'.
I have checked a couple of posts form the list but I dont know what do
really do. (function property map, exceptions in visitors etc)
http://thread.gmane.org/gmane.comp.lib.boost.user/54392/focus=54397
http://thread.gmane.org/gmane.comp.lib.boost.user/72072/focus=72074
http://thread.gmane.org/gmane.comp.lib.boost.user/73358/focus=73384
I havent found any example or source online that deals with something similar.
Any ideas? code example or tutorials?
Best,
Tasos
my graph for example:
struct VertexProperties
{
double m_length;
int m_ref;
};
typedef double Weight;
typedef boost::property<boost::edge_weight_t, double> EdgeWeightProperty;
typedef boost::adjacency_list<boost::vecS, boost::vecS,
boost::undirectedS, VertexProperties, EdgeWeightProperty> unGraph;
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