Search Results for

    Show / Hide Table of Contents

    Class DictionaryBasedOccurrencesCounter

    An implementation of IOccurrencesCounter which uses a to build the two-level of occurrences, indexed by distinct item values and index.

    Inheritance
    System.Object
    DictionaryBasedOccurrencesCounter
    Implements
    IOccurrencesCounter
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: MoreStructures.Lists.Counting
    Assembly: MoreStructures.dll
    Syntax
    public class DictionaryBasedOccurrencesCounter : IOccurrencesCounter

    Methods

    | Improve this Doc View Source

    Count<T>(IEnumerable<T>)

    Declaration
    public IDictionary<T, IDictionary<int, int>> Count<T>(IEnumerable<T> enumerable)
    Parameters
    Type Name Description
    IEnumerable<T> enumerable
    Returns
    Type Description
    IDictionary<T, IDictionary<System.Int32, System.Int32>>
    Type Parameters
    Name Description
    T

    The type of items of enumerable.

    Remarks

    Perform counting by keeping a of the current number of occurrences per item encountered, by distinct value of T and index, while enumerating enumerable.
    Both Time Complexity and Space Complexity are O(n * sigma), where n = number of items in enumerable and sigma = number of the alphabet of enumerable, i.e. the number of distinct items of type T in enumerable.

    Implements

    IOccurrencesCounter

    Extension Methods

    SuffixStructureNodeExtensions.GetAllSuffixesFor<TEdge, TNode>(TNode, TextWithTerminator)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX