Interface BigMatrix

  • All Superinterfaces:
    AnyMatrix
    All Known Implementing Classes:
    BigMatrixImpl

    @Deprecated
    public interface BigMatrix
    extends AnyMatrix
    Deprecated.
    as of 2.0, replaced by FieldMatrix with a BigReal parameter
    Interface defining a real-valued matrix with basic algebraic operations, using BigDecimal representations for the entries.

    Matrix element indexing is 0-based -- e.g., getEntry(0, 0) returns the element in the first row, first column of the matrix.

    Version:
    $Revision: 811786 $ $Date: 2009-09-06 11:36:08 +0200 (dim. 06 sept. 2009) $
    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      BigMatrix add​(BigMatrix m)
      Deprecated.
      Compute the sum of this and m.
      BigMatrix copy()
      Deprecated.
      Returns a (deep) copy of this.
      java.math.BigDecimal[] getColumn​(int col)
      Deprecated.
      Returns the entries in column number col as an array.
      double[] getColumnAsDoubleArray​(int col)
      Deprecated.
      Returns the entries in column number col as an array of double values.
      BigMatrix getColumnMatrix​(int column)
      Deprecated.
      Returns the entries in column number column as a column matrix.
      java.math.BigDecimal[][] getData()
      Deprecated.
      Returns matrix entries as a two-dimensional array.
      double[][] getDataAsDoubleArray()
      Deprecated.
      Returns matrix entries as a two-dimensional array.
      java.math.BigDecimal getDeterminant()
      Deprecated.
      Returns the determinant of this matrix.
      java.math.BigDecimal getEntry​(int row, int column)
      Deprecated.
      Returns the entry in the specified row and column.
      double getEntryAsDouble​(int row, int column)
      Deprecated.
      Returns the entry in the specified row and column as a double.
      java.math.BigDecimal getNorm()
      Deprecated.
      Returns the maximum absolute row sum norm of the matrix.
      int getRoundingMode()
      Deprecated.
      Gets the rounding mode
      java.math.BigDecimal[] getRow​(int row)
      Deprecated.
      Returns the entries in row number row as an array.
      double[] getRowAsDoubleArray​(int row)
      Deprecated.
      Returns the entries in row number row as an array of double values.
      BigMatrix getRowMatrix​(int row)
      Deprecated.
      Returns the entries in row number row as a row matrix.
      BigMatrix getSubMatrix​(int[] selectedRows, int[] selectedColumns)
      Deprecated.
      Gets a submatrix.
      BigMatrix getSubMatrix​(int startRow, int endRow, int startColumn, int endColumn)
      Deprecated.
      Gets a submatrix.
      java.math.BigDecimal getTrace()
      Deprecated.
      Returns the trace of the matrix (the sum of the elements on the main diagonal).
      BigMatrix inverse()
      Deprecated.
      Returns the inverse of this matrix.
      BigMatrix multiply​(BigMatrix m)
      Deprecated.
      Returns the result of postmultiplying this by m.
      java.math.BigDecimal[] operate​(java.math.BigDecimal[] v)
      Deprecated.
      Returns the result of multiplying this by the vector v.
      java.math.BigDecimal[] preMultiply​(java.math.BigDecimal[] v)
      Deprecated.
      Returns the (row) vector result of premultiplying this by the vector v.
      BigMatrix preMultiply​(BigMatrix m)
      Deprecated.
      Returns the result premultiplying this by m.
      BigMatrix scalarAdd​(java.math.BigDecimal d)
      Deprecated.
      Returns the result of adding d to each entry of this.
      BigMatrix scalarMultiply​(java.math.BigDecimal d)
      Deprecated.
      Returns the result multiplying each entry of this by d.
      java.math.BigDecimal[] solve​(java.math.BigDecimal[] b)
      Deprecated.
      Returns the solution vector for a linear system with coefficient matrix = this and constant vector = b.
      BigMatrix solve​(BigMatrix b)
      Deprecated.
      Returns a matrix of (column) solution vectors for linear systems with coefficient matrix = this and constant vectors = columns of b.
      BigMatrix subtract​(BigMatrix m)
      Deprecated.
      Compute this minus m.
      BigMatrix transpose()
      Deprecated.
      Returns the transpose of this matrix.
    • Method Detail

      • copy

        BigMatrix copy()
        Deprecated.
        Returns a (deep) copy of this.
        Returns:
        matrix copy
      • add

        BigMatrix add​(BigMatrix m)
               throws java.lang.IllegalArgumentException
        Deprecated.
        Compute the sum of this and m.
        Parameters:
        m - matrix to be added
        Returns:
        this + m
        Throws:
        java.lang.IllegalArgumentException - if m is not the same size as this
      • subtract

        BigMatrix subtract​(BigMatrix m)
                    throws java.lang.IllegalArgumentException
        Deprecated.
        Compute this minus m.
        Parameters:
        m - matrix to be subtracted
        Returns:
        this + m
        Throws:
        java.lang.IllegalArgumentException - if m is not the same size as this
      • scalarAdd

        BigMatrix scalarAdd​(java.math.BigDecimal d)
        Deprecated.
        Returns the result of adding d to each entry of this.
        Parameters:
        d - value to be added to each entry
        Returns:
        d + this
      • scalarMultiply

        BigMatrix scalarMultiply​(java.math.BigDecimal d)
        Deprecated.
        Returns the result multiplying each entry of this by d.
        Parameters:
        d - value to multiply all entries by
        Returns:
        d * this
      • multiply

        BigMatrix multiply​(BigMatrix m)
                    throws java.lang.IllegalArgumentException
        Deprecated.
        Returns the result of postmultiplying this by m.
        Parameters:
        m - matrix to postmultiply by
        Returns:
        this * m
        Throws:
        java.lang.IllegalArgumentException - if columnDimension(this) != rowDimension(m)
      • preMultiply

        BigMatrix preMultiply​(BigMatrix m)
                       throws java.lang.IllegalArgumentException
        Deprecated.
        Returns the result premultiplying this by m.
        Parameters:
        m - matrix to premultiply by
        Returns:
        m * this
        Throws:
        java.lang.IllegalArgumentException - if rowDimension(this) != columnDimension(m)
      • getData

        java.math.BigDecimal[][] getData()
        Deprecated.
        Returns matrix entries as a two-dimensional array.
        Returns:
        2-dimensional array of entries
      • getDataAsDoubleArray

        double[][] getDataAsDoubleArray()
        Deprecated.
        Returns matrix entries as a two-dimensional array.
        Returns:
        2-dimensional array of entries
      • getRoundingMode

        int getRoundingMode()
        Deprecated.
        Gets the rounding mode
        Returns:
        the rounding mode
      • getSubMatrix

        BigMatrix getSubMatrix​(int startRow,
                               int endRow,
                               int startColumn,
                               int endColumn)
                        throws MatrixIndexException
        Deprecated.
        Gets a submatrix. Rows and columns are indicated counting from 0 to n-1.
        Parameters:
        startRow - Initial row index
        endRow - Final row index
        startColumn - Initial column index
        endColumn - Final column index
        Returns:
        The subMatrix containing the data of the specified rows and columns
        Throws:
        MatrixIndexException - if the indices are not valid
      • getSubMatrix

        BigMatrix getSubMatrix​(int[] selectedRows,
                               int[] selectedColumns)
                        throws MatrixIndexException
        Deprecated.
        Gets a submatrix. Rows and columns are indicated counting from 0 to n-1.
        Parameters:
        selectedRows - Array of row indices.
        selectedColumns - Array of column indices.
        Returns:
        The subMatrix containing the data in the specified rows and columns
        Throws:
        MatrixIndexException - if row or column selections are not valid
      • getRowMatrix

        BigMatrix getRowMatrix​(int row)
                        throws MatrixIndexException
        Deprecated.
        Returns the entries in row number row as a row matrix. Row indices start at 0.
        Parameters:
        row - the row to be fetched
        Returns:
        row matrix
        Throws:
        MatrixIndexException - if the specified row index is invalid
      • getColumnMatrix

        BigMatrix getColumnMatrix​(int column)
                           throws MatrixIndexException
        Deprecated.
        Returns the entries in column number column as a column matrix. Column indices start at 0.
        Parameters:
        column - the column to be fetched
        Returns:
        column matrix
        Throws:
        MatrixIndexException - if the specified column index is invalid
      • getRow

        java.math.BigDecimal[] getRow​(int row)
                               throws MatrixIndexException
        Deprecated.
        Returns the entries in row number row as an array.

        Row indices start at 0. A MatrixIndexException is thrown unless 0 <= row < rowDimension.

        Parameters:
        row - the row to be fetched
        Returns:
        array of entries in the row
        Throws:
        MatrixIndexException - if the specified row index is not valid
      • getRowAsDoubleArray

        double[] getRowAsDoubleArray​(int row)
                              throws MatrixIndexException
        Deprecated.
        Returns the entries in row number row as an array of double values.

        Row indices start at 0. A MatrixIndexException is thrown unless 0 <= row < rowDimension.

        Parameters:
        row - the row to be fetched
        Returns:
        array of entries in the row
        Throws:
        MatrixIndexException - if the specified row index is not valid
      • getColumn

        java.math.BigDecimal[] getColumn​(int col)
                                  throws MatrixIndexException
        Deprecated.
        Returns the entries in column number col as an array.

        Column indices start at 0. A MatrixIndexException is thrown unless 0 <= column < columnDimension.

        Parameters:
        col - the column to be fetched
        Returns:
        array of entries in the column
        Throws:
        MatrixIndexException - if the specified column index is not valid
      • getColumnAsDoubleArray

        double[] getColumnAsDoubleArray​(int col)
                                 throws MatrixIndexException
        Deprecated.
        Returns the entries in column number col as an array of double values.

        Column indices start at 0. A MatrixIndexException is thrown unless 0 <= column < columnDimension.

        Parameters:
        col - the column to be fetched
        Returns:
        array of entries in the column
        Throws:
        MatrixIndexException - if the specified column index is not valid
      • getEntry

        java.math.BigDecimal getEntry​(int row,
                                      int column)
                               throws MatrixIndexException
        Deprecated.
        Returns the entry in the specified row and column.

        Row and column indices start at 0 and must satisfy

        • 0 <= row < rowDimension
        • 0 <= column < columnDimension
        otherwise a MatrixIndexException is thrown.

        Parameters:
        row - row location of entry to be fetched
        column - column location of entry to be fetched
        Returns:
        matrix entry in row,column
        Throws:
        MatrixIndexException - if the row or column index is not valid
      • getEntryAsDouble

        double getEntryAsDouble​(int row,
                                int column)
                         throws MatrixIndexException
        Deprecated.
        Returns the entry in the specified row and column as a double.

        Row and column indices start at 0 and must satisfy

        • 0 <= row < rowDimension
        • 0 <= column < columnDimension
        otherwise a MatrixIndexException is thrown.

        Parameters:
        row - row location of entry to be fetched
        column - column location of entry to be fetched
        Returns:
        matrix entry in row,column
        Throws:
        MatrixIndexException - if the row or column index is not valid
      • transpose

        BigMatrix transpose()
        Deprecated.
        Returns the transpose of this matrix.
        Returns:
        transpose matrix
      • getTrace

        java.math.BigDecimal getTrace()
        Deprecated.
        Returns the trace of the matrix (the sum of the elements on the main diagonal).
        Returns:
        trace
      • operate

        java.math.BigDecimal[] operate​(java.math.BigDecimal[] v)
                                throws java.lang.IllegalArgumentException
        Deprecated.
        Returns the result of multiplying this by the vector v.
        Parameters:
        v - the vector to operate on
        Returns:
        this*v
        Throws:
        java.lang.IllegalArgumentException - if columnDimension != v.size()
      • preMultiply

        java.math.BigDecimal[] preMultiply​(java.math.BigDecimal[] v)
                                    throws java.lang.IllegalArgumentException
        Deprecated.
        Returns the (row) vector result of premultiplying this by the vector v.
        Parameters:
        v - the row vector to premultiply by
        Returns:
        v*this
        Throws:
        java.lang.IllegalArgumentException - if rowDimension != v.size()
      • solve

        java.math.BigDecimal[] solve​(java.math.BigDecimal[] b)
                              throws java.lang.IllegalArgumentException,
                                     InvalidMatrixException
        Deprecated.
        Returns the solution vector for a linear system with coefficient matrix = this and constant vector = b.
        Parameters:
        b - constant vector
        Returns:
        vector of solution values to AX = b, where A is *this
        Throws:
        java.lang.IllegalArgumentException - if this.rowDimension != b.length
        InvalidMatrixException - if this matrix is not square or is singular
      • solve

        BigMatrix solve​(BigMatrix b)
                 throws java.lang.IllegalArgumentException,
                        InvalidMatrixException
        Deprecated.
        Returns a matrix of (column) solution vectors for linear systems with coefficient matrix = this and constant vectors = columns of b.
        Parameters:
        b - matrix of constant vectors forming RHS of linear systems to to solve
        Returns:
        matrix of solution vectors
        Throws:
        java.lang.IllegalArgumentException - if this.rowDimension != row dimension
        InvalidMatrixException - if this matrix is not square or is singular