2 Copyright (c) 2003-2006 Niels Kokholm and Peter Sestoft
3 Permission is hereby granted, free of charge, to any person obtaining a copy
4 of this software and associated documentation files (the "Software"), to deal
5 in the Software without restriction, including without limitation the rights
6 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 copies of the Software, and to permit persons to whom the Software is
8 furnished to do so, subject to the following conditions:
10 The above copyright notice and this permission notice shall be included in
11 all copies or substantial portions of the Software.
13 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 using System
.Diagnostics
;
24 using SCG
= System
.Collections
.Generic
;
29 /// The symbolic characterization of the speed of lookups for a collection.
30 /// The values may refer to worst-case, amortized and/or expected asymtotic
31 /// complexity wrt. the collection size.
33 public enum Speed
: short
36 /// Counting the collection with the <code>Count property</code> may not return
37 /// (for a synthetic and potentially infinite collection).
39 PotentiallyInfinite
= 1,
41 /// Lookup operations like <code>Contains(T item)</code> or the <code>Count</code>
42 /// property may take time O(n),
43 /// where n is the size of the collection.
47 /// Lookup operations like <code>Contains(T item)</code> or the <code>Count</code>
48 /// property takes time O(log n),
49 /// where n is the size of the collection.
53 /// Lookup operations like <code>Contains(T item)</code> or the <code>Count</code>
54 /// property takes time O(1),
55 /// where n is the size of the collection.
63 public enum ItemEqualityTypeEnum
66 /// Only an Equals(T,T)
70 /// Equals(T,T) and GetHashCode(T)
72 HashingEqualityComparer,
78 /// Compatible Compare(T,T) and GetHashCode(T)
85 /// Direction of enumeration order relative to original collection.
87 public enum EnumerationDirection
94 /// Opposite direction