• v1 + ... + vM

    Component-wise addition of M n-dimensional vectors. Target is used to store the results.

    Type Parameters

    Parameters

    • vectors: T[]

      Array of vectors with length n.

    • target: T = ...

      Target for storing the results (Default: vectors[0])

    Returns T

    Resulting vector

    Example

    addAll([ [1, 2], [3, 4], [5, 6] ], new Array(2)); // Returns: [9, 12]
    

Generated using TypeDoc