Search Results for

    Show / Hide Table of Contents

    Class SmallListSet

    SmallListSet stores a set of short integer-valued variable-size lists. The lists are encoded into a few large DVector buffers, with internal pooling, so adding/removing lists usually does not involve any new or delete ops.

    The lists are stored in two parts. The first N elements are stored in a linear subset of a dvector. If the list spills past these N elements, the extra elements are stored in a linked list (which is also stored in a flat array).

    Each list stores its count, so list-size operations are constant time. All the internal "pointers" are 32-bit.

    Inheritance
    Object
    SmallListSet
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: g3
    Assembly: cs.temp.dll.dll
    Syntax
    public class SmallListSet

    Constructors

    SmallListSet()

    Declaration
    public SmallListSet()

    SmallListSet(SmallListSet)

    Declaration
    public SmallListSet(SmallListSet copy)
    Parameters
    Type Name Description
    SmallListSet copy

    Properties

    MemoryUsage

    Declaration
    public string MemoryUsage { get; }
    Property Value
    Type Description
    String

    Size

    returns largest current list_index

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

    Methods

    allocate_block()

    Declaration
    protected int allocate_block()
    Returns
    Type Description
    Int32

    AllocateAt(Int32)

    create a new list at list_index

    Declaration
    public void AllocateAt(int list_index)
    Parameters
    Type Name Description
    Int32 list_index

    Clear(Int32)

    remove all elements from list at list_index

    Declaration
    public void Clear(int list_index)
    Parameters
    Type Name Description
    Int32 list_index

    Contains(Int32, Int32)

    search for val in list at list_index

    Declaration
    public bool Contains(int list_index, int val)
    Parameters
    Type Name Description
    Int32 list_index
    Int32 val
    Returns
    Type Description
    Boolean

    Count(Int32)

    return size of list at list_index

    Declaration
    public int Count(int list_index)
    Parameters
    Type Name Description
    Int32 list_index
    Returns
    Type Description
    Int32

    Find(Int32, Func<Int32, Boolean>, Int32)

    search for findF(list_value) == true, of list at list_index, and return list_value

    Declaration
    public int Find(int list_index, Func<int, bool> findF, int invalidValue = -1)
    Parameters
    Type Name Description
    Int32 list_index
    Func<Int32, Boolean> findF
    Int32 invalidValue
    Returns
    Type Description
    Int32

    First(Int32)

    return the first item in the list at list_index (no zero-size-list checking)

    Declaration
    public int First(int list_index)
    Parameters
    Type Name Description
    Int32 list_index
    Returns
    Type Description
    Int32

    Insert(Int32, Int32)

    insert val into list at list_index.

    Declaration
    public void Insert(int list_index, int val)
    Parameters
    Type Name Description
    Int32 list_index
    Int32 val

    Move(Int32, Int32)

    move list at from_index to to_index

    Declaration
    public void Move(int from_index, int to_index)
    Parameters
    Type Name Description
    Int32 from_index
    Int32 to_index

    Remove(Int32, Int32)

    remove val from the list at list_index. return false if val was not in list.

    Declaration
    public bool Remove(int list_index, int val)
    Parameters
    Type Name Description
    Int32 list_index
    Int32 val
    Returns
    Type Description
    Boolean

    Replace(Int32, Func<Int32, Boolean>, Int32)

    search for findF(list_value) == true, of list at list_index, and replace with new_value. returns false if not found

    Declaration
    public bool Replace(int list_index, Func<int, bool> findF, int new_value)
    Parameters
    Type Name Description
    Int32 list_index
    Func<Int32, Boolean> findF
    Int32 new_value
    Returns
    Type Description
    Boolean

    Resize(Int32)

    resize the list-of-lists

    Declaration
    public void Resize(int new_size)
    Parameters
    Type Name Description
    Int32 new_size

    ValueItr(Int32)

    iterate over the values of list at list_index

    Declaration
    public IEnumerable<int> ValueItr(int list_index)
    Parameters
    Type Name Description
    Int32 list_index
    Returns
    Type Description
    IEnumerable<Int32>
    In This Article
    Back to top ViRGIS VR GIS