[PATCH] Postinstall script ordering in setup - take 3

Igor Pechtchanski pechtcha@cs.nyu.edu
Sun Mar 16 20:13:00 GMT 2003


On 16 Mar 2003, Robert Collins wrote:

> On Sun, 2003-03-16@08:48, Robert Collins wrote:
> > On Sat, 2003-03-15@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@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.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



More information about the Cygwin-apps mailing list