Search Results for

    Show / Hide Table of Contents

    Class ArrayBasedDataStructure<T>

    Exposes properties shared by data structures based on a backing array of items of type T.

    Inheritance
    System.Object
    ArrayBasedDataStructure<T>
    ArrayListQueue<T>
    ArrayListStack<T>
    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.Stacks
    Assembly: MoreStructures.dll
    Syntax
    public abstract class ArrayBasedDataStructure<T>
    Type Parameters
    Name Description
    T

    The type of items, the data structure is composed of.

    Constructors

    | Improve this Doc View Source

    ArrayBasedDataStructure(Int32, Double)

    Initializes the data structure with an array list of initial capacity equals to the provided capacity.

    Declaration
    protected ArrayBasedDataStructure(int capacity = 16, double increasingFactor = 2)
    Parameters
    Type Name Description
    System.Int32 capacity

    The initial capacity of the backing array. If not specified, DefaultInitialCapacity is used.

    System.Double increasingFactor

    Fields

    | Improve this Doc View Source

    DefaultIncreasingFactor

    The default value for IncreasingFactor.

    Declaration
    public const double DefaultIncreasingFactor = 2
    Field Value
    Type Description
    System.Double
    | Improve this Doc View Source

    DefaultInitialCapacity

    The default initial size of the array backing the data structure.

    Declaration
    public const int DefaultInitialCapacity = 16
    Field Value
    Type Description
    System.Int32
    Remarks

    In an array initialized with capacity x, up to x insertions can be done in constant time, with no need for array resizing.

    Properties

    | Improve this Doc View Source

    IncreasingFactor

    The multiplicative factor used to resize the underlying array, every time it gets full.

    Declaration
    public double IncreasingFactor { get; }
    Property Value
    Type Description
    System.Double
    Remarks

    Required to be bigger than 1.0.

    | Improve this Doc View Source

    Items

    The array of items, backing this data structure.

    Declaration
    protected T[] Items { get; set; }
    Property Value
    Type Description
    T[]

    Methods

    | Improve this Doc View Source

    ResizeItems(Double)

    Resizes the Items array, applying the provided factor to its length.

    Declaration
    protected virtual void ResizeItems(double factor)
    Parameters
    Type Name Description
    System.Double factor

    The multiplicative factor to be applied to the length of the array.

    Extension Methods

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