|
Boost : |
From: jeremy siek (jsiek_at_[hidden])
Date: 2000-09-19 18:19:39
David Abrahams writes:
> Look, it's really not an accessor the way you've defined it... it's more of
> a reference. In some sense, it's just like a descriptor - an abstract
> identifier for the value(s) in question. The accessing all happens inside of
> get()/put().
The vertex and edge descriptors refer to a particular object, whereas
the property accessors are maps from objects to properties. If there's
a better name for this than "property accessor" I'm all ears.
(though, for starters I think using "map" would be too mathematical)
> Too much, I still think. Something short and sweet would be better. If you
> must have "accessor" in the name, then how about
> "edge_capacity::accessor(G)"?
> [I still don't like accessor <growl>]
I can live that :)
> > > edge_capacity::get(G, e)
> > > edge_capacity::put(G, e, c)
> > >
> Fine, I have no problem with keeping the generic interface. And one should
> use the generic interface for generic algorithms. But what about the poor
> user who has built a specific graph and just wants to extract the least-cost
> predecessor values from his vertices after running Djikstra?
I can live with adding the above functionality to the adjacency_list
class, but I'd rather not add this interface to any graph concept.
That should discourage its use in a graph algorithm.
Cheers,
Jeremy
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk