AdaCAD Library Documentation - v1.1.4
    Preparing search index...
    Index

    Constructors

    • Parameters

      • OptionalinitSequence: number[]

      Returns OneD

    Methods

    • Parameters

      • filter: string
      • seq: OneD

      Returns OneD

    • Parameters

      • val: number

      Returns OneD

    • gets the value at a specified position

      Parameters

      • i: number

      Returns number

      the value at this location, or -1 if the location was invalid

    • clears the current state and pushes a new row into the state value

      Parameters

      • row: number[] | Cell[]

      Returns OneD

    • inverts all of the values of the current state

      Returns OneD

    • returns the length of the given state

      Returns number

      a number 0 or above

    • given a sequence as input. It makes sure the current state and the sequence submitted to the function are modified to be the same length. They are made the same length by appending unset values to the sequence.

      Parameters

      Returns OneD

    • adds unset cells so that it is of length n.

      Parameters

      • n: number

        the length of the sequence

      Returns undefined | OneD

    • pushes a new value to the current sequence state

      Parameters

      • val: null | number | boolean

        can accept a number or boolean.

      Returns OneD

    • Parameters

      • push_val: number | boolean
      • multiple: number

      Returns OneD

    • pushes a new row into the state value without clearing the state

      Parameters

      • row: number[] | Cell[]

      Returns OneD

    • repeats the sequence val times returning a sequence of size val * original sequence

      Parameters

      • val: number

        the number of times you would like to repeat. 1 returns itself. 0 returns nothing

      Returns undefined | OneD

    • repeats or cuts the current sequence so that it is of length n.

      Parameters

      • n: number

        the length of the sequence

      Returns OneD

    • Returns OneD

    • gets the value at a specified position

      Parameters

      • i: number
      • val: number | boolean

      Returns OneD

      the value at this location, or -1 if the location was invalid

    • shifts the sequence in the amount of val

      Parameters

      • val: number

        a positive or negative number that controls the direction of the shift

      Returns OneD

    • slices a portion of the sequence

      Parameters

      • start: number
      • end: number

      Returns OneD

    • adds a new value to the front of current sequence state

      Parameters

      • val: number | boolean

        can accept a number or boolean.

      Returns OneD

    • Parameters

      • push_val: number | boolean
      • multiple: number

      Returns OneD

    • provides the value of the state at this given moment of computation.

      Returns number[]

      the sequence as a numeric array