Hi Tiago,
I've tried using examine_edge. However it still doesn't cover the use case
I mentioned where
Cost(edge) = function(edge, Cost_path_until_edge) =
edge[interval_lookup(Cost_path_until_edge, edge.intervals)][cost_interval]
Specifically, before I compute the weight/cost of the edge, I need the cost
calculated at the visitor to the edge.
Since only a single argument u(edge) is passed, I am unable to retrieve the
cost at the visitor attempting to travel via this edge.
On Fri, Sep 19, 2014 at 4:09 AM, Tiago Peixoto [via Main discussion list
for the graph-tool project] <[email protected]>
wrote:
> On 18.09.2014 21:46, ambasta wrote:
> > From what I understand of Dijkstras search, Dijkstras visitor is
> > invoked at traversal of a vertex. However, this is still separate from
> > the weights which is a required argument the algorithm takes. In my
> > case however, the weight of traversing the edge is a function of cost
> > of traversing to the edge from the origin vertex.
>
> Read the documentation carefully. The visitor is invoked at several
> event points, one of which is "examine_edge", which is called before any
> edge is discovered by the algorithm. You can use this to set up the
> weights. This seems to be exactly what you want.
>
> Best,
> Tiago
>
> --
> Tiago de Paula Peixoto <[hidden email]
> <http://user/SendEmail.jtp?type=node&node=4025749&i=0>>
> _______________________________________________
> graph-tool mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=4025749&i=1>
> http://lists.skewed.de/mailman/listinfo/graph-tool
> --
> Tiago de Paula Peixoto <[email protected]>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/Using-a-EdgePropertyMap-object-as-weights-tp4025744p4025749.html
> To unsubscribe from Using a EdgePropertyMap('object') as weights, click
> here
> <http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4025744&code=YW1pdC5wcmFrYXNoLmFtYmFzdGFAZ21haWwuY29tfDQwMjU3NDR8MTk5MTkwNzYwMQ==>
> .
> NAML
> <http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
--
Ameno dom, Domi ne reo
Amit
--
View this message in context:
http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/Using-a-EdgePropertyMap-object-as-weights-tp4025744p4025846.html
Sent from the Main discussion list for the graph-tool project mailing list
archive at Nabble.com._______________________________________________
graph-tool mailing list
[email protected]
http://lists.skewed.de/mailman/listinfo/graph-tool