Boost logo

Boost :

From: Jeremy Siek (jsiek_at_[hidden])
Date: 2001-04-16 11:12:33


I've been looking into using the named parameters technique
for the algorithm interfaces in the Boost Graph Library.
For example, calling Dijkstra's algorithm would look like
this:

dijkstra_shortest_paths(g, s, distance_map(d).predecessor_map(p));

There are several advantages to this:
  - defaults no longer order-dependent
  - better readability
  - better defaults for "utility" properties. E.g., for color map
     the algorithm can by default use an internally allocated array.

Ideally, we'd keep the old interface (and call it deprecated) and add
functions for the new named parameter interface. However, there are a few
places where the new functions would interfere with the old in terms of
function overloading.

So there's two options:

1) Ditch the old interface, replace it with the new.

2) Keep the old interface, use different names for the new functions.
 

I'm in favor of option 1), but if there are strong feelings for
option 2) I can be swayed.

Cheers,
Jeremy

----------------------------------------------------------------------
 Jeremy Siek www: http://www.lsc.nd.edu/~jsiek/
 Ph.D. Candidate email: jsiek_at_[hidden]
 Univ. of Notre Dame work phone: (219) 631-3906
----------------------------------------------------------------------


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk