Метод | Описание | |
---|---|---|
Add ( IComparable myKey, long myVertexID, IndexAddStrategy myIndexAddStrategy = IndexAddStrategy.MERGE ) : void |
Adds a search key and its associated value to the index. If IndexAddStrategy is REPLACE, an existing values associated with the key will be replaced by the new value. If IndexAddStrategy is MERGE, the new value will be added to the existing set. If IndexAddStrategy is UNIQUE, an exception will be thrown if the key already exists.
|
|
BinaryTreeIndex ( ) : System |
Empty constructor. This one is important for the sones PluginManager.
|
|
BinaryTreeIndex ( IList |
Initializes the binary tree index and assigns a list of propertyIDs to the internal member.
|
|
Clear ( ) : void |
Resets the index by setting the root node to null and letting the GC do the work.
|
|
ContainsKey ( IComparable myKey ) : bool |
Checks if a given key exists in the index.
|
|
Dispose ( ) : void |
Releases all resources which are hold by the index.
|
|
GetKeyType ( ) : |
Returns the type of the indexed keys. Note: If the index is empty the typeof(IComparable) will be returned.
|
|
InitializePlugin ( string UniqueString, object>.Dictionary |
This method is called by the plugin manager when the plugin is loaded. It loads the indexed propertyIDs out of the parameter dictionary and initializes the index with these propertyIDs
|
|
KeyCount ( ) : long |
Returns the number of keys stored in the index.
|
|
Keys ( ) : IEnumerable |
Returns sorted keys stored in the tree.
|
|
Optimize ( ) : void |
Currently nothing happens here. TODO: maybe some rebalancing
|
|
Remove ( IComparable myKey ) : bool |
Removes the given key and all associated values from the index.
|
|
RemoveRange ( IEnumerable |
Removes multiple keys from the index
|
|
TryGetValues ( IComparable myKey, IEnumerable |
Writes the associated value to the out param if the key exists.
|
|
TryRemoveValue ( IComparable myKey, long myValue ) : bool |
Checks if a given value is associated with a given key and if yes, the key will be deleted from the index. TODO: this method checks first if key and value exists and then removes it. maybe this can be done in one step by duplicating the remove method.
|
|
ValueCount ( ) : long |
Returns the number of values stored in the index.
|
|
this ( IComparable myKey ) : IEnumerable |
Returns the values associated with the given key or throws an Exception if the key does not exist.
|
Метод | Описание | |
---|---|---|
Add ( BinaryTreeNode myTreeNode, IComparable myKey, System.Int64 myValue, IndexAddStrategy myIndexAddStrategy ) : void |
Adds a given search key and the associated value to the index.
|
|
Find ( BinaryTreeNode myTreeNode, IComparable myKey ) : BinaryTreeNode |
Checks if a given key exists in the tree
|
|
FindMinNodeIn ( BinaryTreeNode myTreeNode ) : BinaryTreeNode |
Returns the minimum BinaryTreeNode in a subtree. The minimum node is the most left node in the subtree.
|
|
Remove ( BinaryTreeNode myTreeNode, IComparable myKey, bool &myRemoved ) : BinaryTreeNode |
Removes a given key from the tree, if it exists. Returns the new (or existing) root node.
|
|
RemoveMinIn ( BinaryTreeNode myTreeNode ) : BinaryTreeNode |
Removes the minium BinaryTreeNode in a tree. The minimum node is the most left node in the subtree.
|
|
TraverseInOrder ( BinaryTreeNode myTreeNode, List |
Traverses the tree in-order: Left-Root-Right This means the keys are returned sorted.
|
public Add ( IComparable myKey, long myVertexID, IndexAddStrategy myIndexAddStrategy = IndexAddStrategy.MERGE ) : void | ||
myKey | IComparable | Search key |
myVertexID | long | Associated value |
myIndexAddStrategy | IndexAddStrategy | Define what happens, if the key already exists. |
Результат | void |
public BinaryTreeIndex ( IList |
||
myPropertyIDs | IList |
A list of indexed propertyIDs |
Результат | System |
public ContainsKey ( IComparable myKey ) : bool | ||
myKey | IComparable | Search key |
Результат | bool |
public InitializePlugin ( string UniqueString, object>.Dictionary |
||
UniqueString | string | |
myParameters | object>.Dictionary | |
Результат | IPluginable |
public Remove ( IComparable myKey ) : bool | ||
myKey | IComparable | Search key |
Результат | bool |
public RemoveRange ( IEnumerable |
||
myKeys | IEnumerable |
search keys to remove |
Результат | void |
public TryGetValues ( IComparable myKey, IEnumerable |
||
myKey | IComparable | Search key |
myVertexIDs | IEnumerable |
Stores the values (if any exist) |
Результат | bool |
public TryRemoveValue ( IComparable myKey, long myValue ) : bool | ||
myKey | IComparable | search key |
myValue | long | associated value |
Результат | bool |
public this ( IComparable myKey ) : IEnumerable |
||
myKey | IComparable | Search key |
Результат | IEnumerable |