Interface Matrix.Rel<U extends Unit<U>,​S extends Scalar<U,​S>,​V extends Vector<U,​S,​V>,​RM extends Matrix.Rel<U,​S,​V,​RM>>

    • Method Detail

      • plus

        RM plus​(RM increment)
         throws ValueRuntimeException
        Add a relative matrix to this relative mutable matrix. A new matrix is returned. The display unit of the result is the display unit of this relative matrix. The addition is done value by value and the result is stored in a new matrix. If both operands are sparse, the result is a sparse matrix, otherwise the result is a dense matrix.
        Parameters:
        increment - RM; the relative matrix (mutable or immutable, sparse or dense) to add
        Returns:
        RMV; the sum of this matrix and the operand as a new relative, mutable matrix
        Throws:
        ValueRuntimeException - in case this matrix and the operand have a different size
      • minus

        RM minus​(RM decrement)
          throws ValueRuntimeException
        Subtract a relative matrix from this relative mutable matrix. The display unit of the result is the display unit of this relative matrix. The subtraction is done value by value and the result is stored in a new matrix. If both operands are sparse, the result is a sparse matrix, otherwise the result is a dense matrix.
        Parameters:
        decrement - RM; the value to subtract
        Returns:
        RMV; the difference of this matrix and the operand as a new relative, mutable matrix
        Throws:
        ValueRuntimeException - in case this matrix and the operand have a different size
      • multiplyBy

        RM multiplyBy​(double multiplier)
        Multiply all values of this matrix by the multiplier. This only works if the matrix is mutable.
        Parameters:
        multiplier - double; the factor by which to multiply all values
        Returns:
        V; this modified matrix
        Throws:
        ValueRuntimeException - in case the matrix is immutable
      • divideBy

        RM divideBy​(double divisor)
        Divide all values of this matrix by the divisor. This only works if the matrix is mutable.
        Parameters:
        divisor - double; the value by which to divide all values
        Returns:
        V; this modified matrix
        Throws:
        ValueRuntimeException - in case the matrix is immutable