Home > @josh-brown/vector > ArrayVector
Implements Vector with an array of values.
Signature:
export declare abstract class ArrayVector<S = number> implements Vector<S> Implements: Vector<S>
Subclasses must specify the usual scalar operations on their contents.
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the ArrayVector class.
|
Method |
Modifiers |
Description |
|---|---|---|
|
Implements vector addition | ||
|
|
Returns a VectorBuilder which will build new vectors of the same type | |
|
Returns the dimension of the vector | ||
|
Tests if two vectors are equal | ||
|
Returns the dimension of the vector | ||
|
Returns the dimension of the vector | ||
|
Returns the entry of the matrix located at the provided index ( | ||
|
Returns the contents of the vector as a map of indices to nonzero values | ||
|
Implements the inner product (scalar product or dot product) of two vectors | ||
|
Returns the dimension of the vector | ||
|
|
Returns a MatrixBuilder which will build new matrices of a compatible type | |
|
|
Returns a ScalarOperations object which will allow consumers to work generically with the scalars contained in the vector. | |
|
Implements the outer product (matrix product) of two vectors | ||
|
Returns a new vector in the direction of | ||
|
Implements vector multiplication by a scalar | ||
|
Returns a new vector equal to the old one, except with the entry at | ||
|
Returns the contents of the vector as an array |