From: "Matthew Heaney" <mheaney@on2.com>
Subject: Re: Equivalent keys/elements in Ada.Containers Maps and Sets
Date: 23 Jan 2007 08:47:29 -0800
Date: 2007-01-23T08:47:29-08:00 [thread overview]
Message-ID: <1169570849.242150.292730@v45g2000cwv.googlegroups.com> (raw)
In-Reply-To: <1169567122.501077.189450@s48g2000cws.googlegroups.com>
Matthew Heaney wrote:
> Niklas Holsti wrote:
> >
> > One point where this may be significant is the definition of the "="
> > operator on Sets in A.18.7(20/2). The definition requires each element
> > of the Left set to be compared for "=" with the elements of the Right
> > set. If the actual "=" function is unrelated to the Hash function or to
> > the "<" operator for elements, I don't see how the "=" operator on Sets
> > can be implemented in less than O(N**2) complexity.
>
> No, your premise is false.
>
> E1 = E2 => Hash (E1) = Hash (E2)
>
> Equality is always O(1). There are no operations that are O(N**2).
^^^^^^
Oops! I meant to say that equality is always O(n).
-Matt
next prev parent reply other threads:[~2007-01-23 16:47 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-23 12:56 Equivalent keys/elements in Ada.Containers Maps and Sets Niklas Holsti
2007-01-23 15:45 ` Matthew Heaney
2007-01-23 16:47 ` Matthew Heaney [this message]
2007-01-23 23:04 ` Niklas Holsti
2007-01-24 0:43 ` Randy Brukardt
2007-01-24 7:52 ` Niklas Holsti
2007-01-24 21:06 ` Randy Brukardt
2007-01-24 16:50 ` Matthew Heaney
2007-01-24 21:18 ` Randy Brukardt
2007-01-24 21:27 ` Adam Beneschan
2007-01-24 22:50 ` Matthew Heaney
2007-01-25 2:22 ` Adam Beneschan
2007-01-26 0:08 ` Georg Bauhaus
2007-01-24 20:56 ` Adam Beneschan
2007-01-24 20:57 ` Adam Beneschan
2007-01-24 22:56 ` Matthew Heaney
2007-01-25 0:44 ` Randy Brukardt
2007-01-24 16:11 ` Matthew Heaney
2007-01-24 18:12 ` Niklas Holsti
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox