Class Vector<R extends Num>

  • Type Parameters:
    R - The number of rows in this matrix.

    public class Vector<R extends Num>
    extends Matrix<R,​N1>
    A shape-safe wrapper over Efficient Java Matrix Library (EJML) matrices.

    This class is intended to be used alongside the state space library.

    • Constructor Detail

      • Vector

        public Vector​(Nat<R> rows)
        Constructs an empty zero vector of the given dimensions.
        Parameters:
        rows - The number of rows of the vector.
      • Vector

        public Vector​(org.ejml.simple.SimpleMatrix storage)
        Constructs a new Vector with the given storage. Caller should make sure that the provided generic bounds match the shape of the provided Vector.

        NOTE:It is not recommended to use this constructor unless the SimpleMatrix API is absolutely necessary due to the desired function not being accessible through the Vector wrapper.

        Parameters:
        storage - The SimpleMatrix to back this vector.
      • Vector

        public Vector​(Matrix<R,​N1> other)
        Constructs a new vector with the storage of the supplied matrix.
        Parameters:
        other - The Vector to copy the storage of.
    • Method Detail

      • times

        public Vector<Rtimes​(double value)
        Description copied from class: Matrix
        Multiplies all the elements of this matrix by the given scalar.
        Overrides:
        times in class Matrix<R extends Num,​N1>
        Parameters:
        value - The scalar value to multiply by.
        Returns:
        A new matrix with all the elements multiplied by the given value.
      • div

        public Vector<Rdiv​(int value)
        Description copied from class: Matrix
        Divides all elements of this matrix by the given value.
        Overrides:
        div in class Matrix<R extends Num,​N1>
        Parameters:
        value - The value to divide by.
        Returns:
        The resultant matrix.
      • div

        public Vector<Rdiv​(double value)
        Description copied from class: Matrix
        Divides all elements of this matrix by the given value.
        Overrides:
        div in class Matrix<R extends Num,​N1>
        Parameters:
        value - The value to divide by.
        Returns:
        The resultant matrix.