Package org.ejml.data

Interface Matrix

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <T extends Matrix>
      T
      copy()
      Creates an exact copy of the matrix
      <T extends Matrix>
      T
      create​(int numRows, int numCols)
      Creates a new matrix of the same type with the specified shape
      <T extends Matrix>
      T
      createLike()
      Creates a new matrix with the same shape as this matrix
      int getNumCols()
      Returns the number of columns in this matrix.
      int getNumRows()
      Returns the number of rows in this matrix.
      MatrixType getType()
      Returns the type of matrix
      void print()
      Prints the matrix to standard out using standard formatting.
      void print​(java.lang.String format)
      Prints the matrix to standard out with the specified formatting.
      void set​(Matrix original)
      Sets this matrix to be identical to the 'original' matrix passed in.
      void zero()
      Sets all values inside the matrix to zero
    • Method Detail

      • getNumRows

        int getNumRows()
        Returns the number of rows in this matrix.
        Returns:
        Number of rows.
      • getNumCols

        int getNumCols()
        Returns the number of columns in this matrix.
        Returns:
        Number of columns.
      • zero

        void zero()
        Sets all values inside the matrix to zero
      • copy

        <T extends Matrix> T copy()
        Creates an exact copy of the matrix
      • createLike

        <T extends Matrix> T createLike()
        Creates a new matrix with the same shape as this matrix
      • create

        <T extends Matrix> T create​(int numRows,
                                    int numCols)
        Creates a new matrix of the same type with the specified shape
      • set

        void set​(Matrix original)
        Sets this matrix to be identical to the 'original' matrix passed in.
      • print

        void print()
        Prints the matrix to standard out using standard formatting. This is the same as calling print("%e")
      • print

        void print​(java.lang.String format)
        Prints the matrix to standard out with the specified formatting.
        Parameters:
        format - printf style formatting for a float. E.g. "%f"
        See Also:
        Formatter
      • getType

        MatrixType getType()
        Returns the type of matrix