Boost logo

Boost :

From: Paul (elegant_dice_at_[hidden])
Date: 2005-08-04 22:15:39


If I read this correctly, Rob's interpretation of the set algebra is
slightly incorrect.

Rob Stewart wrote:
> From: FlSt_at_[hidden]

<snip>

>>( any_of( a ) >= any_of( b ) ) <= any_of( c )
>>
>>Or if the comparison returns an container:
>>
>>any_of( any_of( a ) >= any_of( b ) ) <= any_of( c )
>
>
> Why would you write those? What do they mean?
>

any_of(a) >= any_of(b)
would return a subset of values from 'a', where those items are >= than
any item in 'b'.

You can't do this:

> (any_of(a) >= min_element(b)) <= max_element(c)

because you are placing a total-ordering requirement on all sets.

what if the sets only satisfy the partial-ordering definition?

Example, let there be b[i] < b[j], but a[k] < b[i] and a[k] > b[j].
So the any_of/any_of variant's result would include a[k] (a[k] > b[j])
but min_element won't, as a[k] < min_element (which is b[i])

Right?

just thought I'd mention it.
thanks
Paul


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