Boost logo

Boost Users :

From: Arias Brent-P96059 (Brent.Arias_at_[hidden])
Date: 2005-03-14 13:21:35


I've been looking over the graph library, and have found it curiously designed. I was hoping someone could provide a brief comment on the rationale of the design (something I didn't spot in the documentation). For example, consider the adjacency_list:

adjacency_list<OutEdgeList, VertexList, Directed, VertexProperties, EdgeProperties, GraphProperties, EdgeList>

I would have thought that the "VertexList" would be templated to permit me to add whatever kind of node I'd like, something like this:

adjacency_list<listS, vecS<myType>, bidirectionalS>

But instead, there is a rather elaborate process of creating a user defined "property" and installing that property. What was the rationale for that "install property" approach, rather than just a templated parameter approach (as I suggested above)?

Even with the improvement with the new "bundled properties" approach of 1.32.0, I find myself still asking the same or similar questions. For example, after an adjacency list is created, why do I need to access the properties of the nodes (bundled or not), with vertex_descriptors? I mean, for example, the "std::map<string, int>" type doesn't require that I make a seperate "vertex_descriptor" or "definition_descriptor" to access an entry in the map. Certainly there was some rationale behind this "vertex descriptor" approach - does anyone know what it was?

Thanks,

-Brent


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