@crow281/ts-file-module-template
    Preparing search index...

    Interface ArrayN<Type>

    Represents an array with an arbitrary number of dimensions.

    interface ArrayN<Type> {
        get dimensions(): number;
        getSize(dimension: number): number;
        getValue(position: number[]): Type;
        setValue(position: number[], value: Type): void;
    }

    Type Parameters

    • Type

    Implemented by

    Index

    Accessors

    Methods

    • Parameters

      • dimension: number

        Dimension we want to get the size of.

      Returns number

      Size of this dimension.

      All unused dimensions will return 0.

    • Parameters

      • position: number[]

        Position we want to retrieve value from.

        If position array has fewer dimensions than this array, they will be treated as 0.

      Returns Type

      Value at position.

    • Parameters

      • position: number[]

        Position we want to store value to.

        If position array has fewer dimensions than this array, they will be treated as 0.

      • value: Type

        Value we want to store at position.

      Returns void