Interface Vector<U extends Unit<U>,​S extends Scalar<U,​S>,​V extends Vector<U,​S,​V>>

    • Method Detail

      • size

        int size()
        Retrieve the size of the vector.
        Returns:
        int; the size of the vector
      • get

        S get​(int index)
        throws ValueRuntimeException
        Retrieve a value from the vector.
        Parameters:
        index - int; the index to retrieve the value at
        Returns:
        S; the value as a Scalar
        Throws:
        ValueRuntimeException - in case index is out of bounds
      • getScalars

        S[] getScalars()
        Return the vector as an array of scalars.
        Returns:
        S[]; the vector as an array of scalars
      • iterator

        Iterator<S> iterator()
        Create and return an iterator over the scalars in this vector in proper sequence.
        Specified by:
        iterator in interface Iterable<U extends Unit<U>>
        Returns:
        Iterator<S>; an iterator over the scalars in this vector in proper sequence