Class DelegateDoubleMatrix1D

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    class DelegateDoubleMatrix1D
    extends WrapperDoubleMatrix1D
    1-d matrix holding double elements; either a view wrapping another 2-d matrix and therefore delegating calls to it.
    Version:
    1.0, 09/24/99
    • Constructor Detail

      • DelegateDoubleMatrix1D

        public DelegateDoubleMatrix1D​(DoubleMatrix2D newContent,
                                      int row)
    • Method Detail

      • getQuick

        public double getQuick​(int index)
        Returns the matrix cell value at coordinate index.

        Provided with invalid parameters this method may return invalid objects without throwing any exception. You should only use this method when you are absolutely sure that the coordinate is within bounds. Precondition (unchecked): index<0 || index>=size().

        Overrides:
        getQuick in class WrapperDoubleMatrix1D
        Parameters:
        index - the index of the cell.
        Returns:
        the value of the specified cell.
      • like

        public DoubleMatrix1D like​(int size)
        Construct and returns a new empty matrix of the same dynamic type as the receiver, having the specified size. For example, if the receiver is an instance of type DenseDoubleMatrix1D the new matrix must also be of type DenseDoubleMatrix1D, if the receiver is an instance of type SparseDoubleMatrix1D the new matrix must also be of type SparseDoubleMatrix1D, etc. In general, the new matrix should have internal parametrization as similar as possible.
        Overrides:
        like in class WrapperDoubleMatrix1D
        Parameters:
        size - the number of cell the matrix shall have.
        Returns:
        a new empty matrix of the same dynamic type.
      • like2D

        public DoubleMatrix2D like2D​(int rows,
                                     int columns)
        Construct and returns a new 2-d matrix of the corresponding dynamic type, entirelly independent of the receiver. For example, if the receiver is an instance of type DenseDoubleMatrix1D the new matrix must be of type DenseDoubleMatrix2D, if the receiver is an instance of type SparseDoubleMatrix1D the new matrix must be of type SparseDoubleMatrix2D, etc.
        Overrides:
        like2D in class WrapperDoubleMatrix1D
        Parameters:
        rows - the number of rows the matrix shall have.
        columns - the number of columns the matrix shall have.
        Returns:
        a new matrix of the corresponding dynamic type.
      • setQuick

        public void setQuick​(int index,
                             double value)
        Sets the matrix cell at coordinate index to the specified value.

        Provided with invalid parameters this method may access illegal indexes without throwing any exception. You should only use this method when you are absolutely sure that the coordinate is within bounds. Precondition (unchecked): index<0 || index>=size().

        Overrides:
        setQuick in class WrapperDoubleMatrix1D
        Parameters:
        index - the index of the cell.
        value - the value to be filled into the specified cell.