|
Boost : |
From: David Abrahams (abrahams_at_[hidden])
Date: 2000-09-20 00:10:48
----- Original Message -----
From: "jeremy siek" <jsiek_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Wednesday, September 20, 2000 12:38 AM
Subject: Re: [boost] Graph stuff
>
> David Abrahams writes:
> > >
> > > get(edge_capacity(), G, e);
> >
> > That looks pretty good.
>
> Since we've got the above free function, how about we have some
> consistency and replace the following:
>
> > edge_capacity::map(G)
>
> with:
>
> map(edge_capacity(), G)
>
> or since that will probably cause name conflicts:
>
> get_map(edge_capacity(), G)
If you really like consistency:
get(edge_capacity(), G)
gets you the edge capacities of G
get(get(edge_capacity(), G), e)
is equivalent to the shorter
get(edge_capacity(), G, e)
I don't like get_map because it's like saying get_size_t(length(),
some_string). The type or structure of edge_capacity is implicit. There's no
need to write it down in the interface. What you're doing is getting the
edge_capacity of the graph. Later you can index it to find the capacity of a
particular edge.
We've been through this all before, though. Maybe we both need to sleep on
it.
-Dave
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk