Interface ISortedDictionary<K, V>
A dictionary with sorted keys.
Inherited Members
Assembly: DistributedLucene.Net.dll
Syntax
public interface ISortedDictionary<K, V> : IDictionary<K, V>, ICollectionValue<KeyValuePair<K, V>>, Collections.Generic.IEnumerable<KeyValuePair<K, V>>, IShowable, IFormattable
Type Parameters
Name | Description |
---|---|
K | |
V |
Properties
Name | Description |
---|---|
Comparer | The key comparer used by this dictionary. |
Keys |
Methods
Name | Description |
---|---|
AddSorted(Collections.Generic.IEnumerable<KeyValuePair<K, V>>) | Add all the items from another collection with an enumeration order that is increasing in the items. |
Cut(IComparable<K>, out KeyValuePair<K, V>, out Boolean, out KeyValuePair<K, V>, out Boolean) | Given a "cut" function from the items of the sorted collection to
whose only sign changes when going through items in increasing order
can be
The "cut" function is supplied as the method
of an object implementing
.
A typical example is the case where is comparable and
is itself of type .
This method performs a search in the sorted collection for the ranges in which the "cut" function is negative, zero respectively positive. If is comparable
and is of type , this is a safe way (no exceptions thrown)
to find predecessor and successor of .
If the supplied cut function does not satisfy the sign-change condition, the result of this call is undefined. |
DeleteMax() | Remove the largest item from this sorted collection. |
DeleteMin() | Remove the least item from this sorted collection. |
FindMax() | Find the current largest item of this sorted collection. |
FindMin() | Find the current least item of this sorted collection. |
Predecessor(K) | Find the entry with the largest key less than a given key. |
RangeAll() | Create a directed collection with the same items as this collection. The returned collection is not a copy but a view into the collection. The view is fragile in the sense that changes to the underlying collection will invalidate the view so that further operations on the view throws InvalidView exceptions. |
RangeFrom(K) | Query this sorted collection for items greater than or equal to a supplied value. The returned collection is not a copy but a view into the collection. The view is fragile in the sense that changes to the underlying collection will invalidate the view so that further operations on the view throws InvalidView exceptions. |
RangeFromTo(K, K) | Query this sorted collection for items between two supplied values. The returned collection is not a copy but a view into the collection. The view is fragile in the sense that changes to the underlying collection will invalidate the view so that further operations on the view throws InvalidView exceptions. |
RangeTo(K) | Query this sorted collection for items less than a supplied value. The returned collection is not a copy but a view into the collection. The view is fragile in the sense that changes to the underlying collection will invalidate the view so that further operations on the view throws InvalidView exceptions. |
RemoveRangeFrom(K) | Remove all items of this collection above or at a supplied threshold. |
RemoveRangeFromTo(K, K) | Remove all items of this collection between two supplied thresholds. |
RemoveRangeTo(K) | Remove all items of this collection below a supplied threshold. |
Successor(K) | Find the entry with the least key greater than a given key. |
TryPredecessor(K, out KeyValuePair<K, V>) | Find the entry in the dictionary whose key is the predecessor of the specified key. |
TrySuccessor(K, out KeyValuePair<K, V>) | Find the entry in the dictionary whose key is the successor of the specified key. |
TryWeakPredecessor(K, out KeyValuePair<K, V>) | Find the entry in the dictionary whose key is the weak predecessor of the specified key. |
TryWeakSuccessor(K, out KeyValuePair<K, V>) | Find the entry in the dictionary whose key is the weak successor of the specified key. |
WeakPredecessor(K) | Find the entry with the largest key less than or equal to a given key. |
WeakSuccessor(K) | Find the entry with the least key greater than or equal to a given key. |