Boost logo

Boost Users :

From: tarjeiknaps (tarjeik_at_[hidden])
Date: 2002-08-09 05:09:56


--- In Boost-Users_at_y..., Jeremy Siek <jsiek_at_c...> wrote:
Hi Jeremy,
Thanks for your reply.

> Hi Tarjei,
>
> One way is to pass in a comparison functor to your algorithm.
>
This sprang to mind shortly after sending my original post :)

And actually, this does make the algorithm more general. Not being
able to pass a comparison functor requires that all properties are
equality comparable, and that all properties are must be checked. You
may have pointers to objects stored as properties, and would like to
check if the objects pointed to are equal and not if they point to the
same object. You may also want to omit checking graph coloring and
such properties.

So I'll go with the comp. functor solution (allthough I'll need two,
one for vertices and one for edges), but still there should be a
default like in STL algorithms like sort(), which compares all
properties by using operator=().

> (One my to-do list is a change the implementation of internal properties
> to use a heterogeneous associative list class that would know how to
check
> for equality, etc.)
>
That sounds nice :)

<snip>

Cheers,
Tarjei Knapstad


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