Boost logo

Boost :

From: jeremy siek (jsiek_at_[hidden])
Date: 2000-09-19 13:27:44

David Abrahams writes:
> Isn't it really there to make up for lack of template template parameters?
> If so, I would hesitate to use the same convention for weight, which will
> never be a TTP.

Right, they are used to replace TTPs.

> property<int, edge_weight> // nobody puts weights on nodes anyway
> property<int, edge_color> // I realize there are some orthogonality
> issues here...
> property<int, node_color> // ...but it may actually make the declaration
> of the graph a lot clearer
> Any of these things strike your fancy or set off a spark?

This last suggestion strikes my fancy. Something that has been bugging
me is that it is hard to tell by looking at an adjacency_list typedef
whether a plugin was being used for a vertex or edge plugin. Having
"edge" or "vertex" in the name certainly makes this stand out.

  typedef adjacency_list<
    mapS, vecS, bidirectionalS,
    property<default_color_type, vertex_color,
          property<int, vertex_in_degree> >,
    property<int, edge_weight>
> Graph;

The orthogonality issue is not a big deal. They are just empty structs
anyways, so having duplicates like edge_color and vertex_color is ok
(though in this case, nobody uses edge_color).



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