On Wed, 6 Jan 2010, gast128 wrote:
Thx for the answer.
<snip>
I know about your note about not using properties for everything possible, but using an old-style vertex_index property would make some things like color maps much easier. However, your way (an external property) works well also.
This is putting a property in the graph? A reason for me not to do that is that indices (as color maps) are just temporary properties; they are needed for graph algorithms to work. When vertices are added or removed, the index map should be adjusted as well. This management can be postponed if it is kept external and build the index map only just in time.
OK. If you are mutating the graph often the approach you suggested makes sense. Vertex/edge indices are not really temporary, though, since they can be reused for different property maps (color, distance, ...) as long as the graph does not change. If you are only using them to satisfy algorithm requirements for particular temporary property maps, though, the index maps should be treated as temporary as well.
So I like to put in the graph only data which conceptual belongs to the graph. The weight of an edge is probably also a candidate to put in the graph instead of keeping it external. That is the next challenge.
What do you mean by that? What is the challenge you are having? -- Jeremiah Willcock