|
Boost : |
From: Rob Stewart (stewart_at_[hidden])
Date: 2005-08-05 08:25:40
From: Paul <elegant_dice_at_[hidden]>
> Rob Stewart wrote:
> > From: FlSt_at_[hidden]
>
> If I read this correctly, Rob's interpretation of the set algebra is
> slightly incorrect.
>
> >>( 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'.
We have been discussing expressions that return a bool, not a
subset, for quite some time. You snipped quite a bit of context,
so I'm not sure how old this discussion really is.
> 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.
I don't know what interpretation you're referring to; you
apparently snipped something from my reply. Otherwise, I was
just questioning the value of such an expression.
> 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])
Possibly so, but that's for a different library than we are now
discussing.
-- Rob Stewart stewart_at_[hidden] Software Engineer http://www.sig.com Susquehanna International Group, LLP using std::disclaimer;
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk