Boost logo

Boost Users :

From: Phillip Ratzloff (pratzl_at_[hidden])
Date: 2002-10-09 23:58:23


I wish to create an internal calculated property that is derived from
existing properties in a vertex or edge. I’d also like to be able to access
it like any other internal property.

For instance, I want a vertex property called weight_sum that would sum the
weights for all the out edges and return the answer. I want to be able to
use a statement "get(vertex_weight_sum,G,v)" to get the value. Later on, I
may decide that I want to cache the value on the vertex (like a normal
property) and existing code should work without change.

I have been unable to figure out any template class specializations to do
this. Additionally, if I try to define the property using the property<>
template in the graph declaration it reserves storage for the property,
which is undesired.

Am I missing something? Is there a way to define a calculated internal
property that doesn’t reserve storage?


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