Class SparseSet | Advanced Algorithms
Search Results for

    Show / Hide Table of Contents

    Class SparseSet

    A sparse set implementation.

    Inheritance
    Object
    SparseSet
    Implements
    IEnumerable<Int32>
    IEnumerable
    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 SparseSet : IEnumerable<int>, IEnumerable

    Constructors

    | Improve this Doc View Source

    SparseSet(Int32, Int32)

    Declaration
    public SparseSet(int maxVal, int capacity)
    Parameters
    Type Name Description
    Int32 maxVal
    Int32 capacity

    Properties

    | Improve this Doc View Source

    Count

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

    Methods

    | Improve this Doc View Source

    Add(Int32)

    Time complexity: O(1).

    Declaration
    public void Add(int value)
    Parameters
    Type Name Description
    Int32 value
    | Improve this Doc View Source

    Clear()

    Time complexity: O(1).

    Declaration
    public void Clear()
    | Improve this Doc View Source

    GetEnumerator()

    Declaration
    public IEnumerator<int> GetEnumerator()
    Returns
    Type Description
    IEnumerator<Int32>
    | Improve this Doc View Source

    HasItem(Int32)

    Time complexity: O(1).

    Declaration
    public bool HasItem(int value)
    Parameters
    Type Name Description
    Int32 value
    Returns
    Type Description
    Boolean
    | Improve this Doc View Source

    Remove(Int32)

    Time complexity: O(1).

    Declaration
    public void Remove(int value)
    Parameters
    Type Name Description
    Int32 value

    Explicit Interface Implementations

    | Improve this Doc View Source

    IEnumerable.GetEnumerator()

    Declaration
    IEnumerator IEnumerable.GetEnumerator()
    Returns
    Type Description
    IEnumerator

    Implements

    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX