This is the mail archive of the
cygwin-apps@cygwin.com
mailing list for the Cygwin project.
Re: [PATCH] Postinstall script ordering in setup - take 3
- From: Igor Pechtchanski <pechtcha at cs dot nyu dot edu>
- To: Robert Collins <rbcollins at cygwin dot com>
- Cc: cygwin-apps at cygwin dot com
- Date: Sun, 16 Mar 2003 15:13:53 -0500 (EST)
- Subject: Re: [PATCH] Postinstall script ordering in setup - take 3
- Reply-to: cygwin-apps at cygwin dot com
On 16 Mar 2003, Robert Collins wrote:
> On Sun, 2003-03-16 at 08:48, Robert Collins wrote:
> > On Sat, 2003-03-15 at 09:33, Igor Pechtchanski wrote:
> > > Rob,
> > > > Your operator > and < appear to have a problem.
> > > >
> > > > foo: bar
> > > > gam: bar
> > > >
> > > > foo > gam = false
> > > > gam < foo = false
> > > > gam == foo = false.
> > > >
> > > > I'd expect stl associative containers to choke on that.
> >
> > > Not really. I read up on that specifically. stl containers only need a
> > > *partial* order. What you're suggesting will create a total order. Not
> > > an error, but overkill. The sort function is supposed to be stable and
> > > keep the original order if the lessThan relation is undefined. See
> > > <http://www.sgi.com/tech/stl/LessThanComparable.html>
>
> And for clarity: my suggested tweak is also not sufficient to provide a
> weak ordering.
> Rob
Rob,
Your suggested tweak provides a total ordering. The "unordered(x,y)"
[!(x < y) && !(y < x)] relation is false for any x != y [since either
(x < y) or (y < x) always holds]. So all equivalence classes have one
element: "unordered(x,x)" is always true. You get transitivity trivially,
as "unordered(x,y) && unordered(y,z)" is only true if x == y == z, and
then you also have "unordered(x,z)".
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha at cs dot nyu dot edu
ZZZzz /,`.-'`' -. ;-;;,_ igor at watson dot ibm dot com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
-- /usr/games/fortune