Boost logo

Boost :

Subject: Re: [boost] [BGL] Get properties from an out_edge_iterator efficiently
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2010-12-17 01:11:17

On Thu, 16 Dec 2010, Shaun Jackman wrote:

> Hi,
> I have a graph implementation where
> get(tag, graph, out_edge_iterator)
> is much more efficient than
> get(tag, graph, edge_descriptor)
> which is probably not an usual case.
> Would it make sense for BGL to provide a default implementation of the
> former that dereferences the iterator and calls the latter? Graphs for
> which the former is more efficient could then specialize this function
> template.

I don't see many use cases where an iterator would be that much faster to
access properties from than an edge descriptor. If the performance is
really a lot better for your implementation, you can store a copy of the
iterator (or whatever information from it needed to get the properties
more quickly) into the edge descriptor itself.

-- Jeremiah Willcock

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