Show / Hide Table of Contents

    Class TreeDictionary<TK, TV>

    A Dictionary implementation using balanced binary search tree (log(n) operations in worst case) This may be better than regular Dictionary implementation which can give o(K) in worst case (but O(1) when collisions K is avoided )

    Inheritance
    Object
    TreeDictionary<TK, TV>
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Advanced.Algorithms.DataStructures
    Assembly: Advanced.Algorithms.dll
    Syntax
    public class TreeDictionary<TK, TV>
        where TK : IComparable
    Type Parameters
    Name Description
    TK
    TV

    Constructors

    TreeDictionary()

    Declaration
    public TreeDictionary()

    Properties

    Count

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    Int32

    Methods

    Add(TK, TV)

    Declaration
    public void Add(TK key, TV value)
    Parameters
    Type Name Description
    TK key
    TV value

    ContainsKey(TK)

    Declaration
    public bool ContainsKey(TK key)
    Parameters
    Type Name Description
    TK key
    Returns
    Type Description
    Boolean

    GetValue(TK)

    Declaration
    public TV GetValue(TK key)
    Parameters
    Type Name Description
    TK key
    Returns
    Type Description
    TV

    Remove(TK)

    Declaration
    public void Remove(TK key)
    Parameters
    Type Name Description
    TK key
    Back to top Generated by DocFX