Package org.apache.commons.math.linear
Interface BigMatrix
- 
- All Superinterfaces:
 AnyMatrix
- All Known Implementing Classes:
 BigMatrixImpl
@Deprecated public interface BigMatrix extends AnyMatrix
Deprecated.as of 2.0, replaced byFieldMatrixwith aBigRealparameterInterface 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. 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description BigMatrixadd(BigMatrix m)Deprecated.Compute the sum of this and m.BigMatrixcopy()Deprecated.Returns a (deep) copy of this.java.math.BigDecimal[]getColumn(int col)Deprecated.Returns the entries in column numbercolas an array.double[]getColumnAsDoubleArray(int col)Deprecated.Returns the entries in column numbercolas an array of double values.BigMatrixgetColumnMatrix(int column)Deprecated.Returns the entries in column numbercolumnas 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.BigDecimalgetDeterminant()Deprecated.Returns the determinant of this matrix.java.math.BigDecimalgetEntry(int row, int column)Deprecated.Returns the entry in the specified row and column.doublegetEntryAsDouble(int row, int column)Deprecated.Returns the entry in the specified row and column as a double.java.math.BigDecimalgetNorm()Deprecated.Returns the maximum absolute row sum norm of the matrix.intgetRoundingMode()Deprecated.Gets the rounding modejava.math.BigDecimal[]getRow(int row)Deprecated.Returns the entries in row numberrowas an array.double[]getRowAsDoubleArray(int row)Deprecated.Returns the entries in row numberrowas an array of double values.BigMatrixgetRowMatrix(int row)Deprecated.Returns the entries in row numberrowas a row matrix.BigMatrixgetSubMatrix(int[] selectedRows, int[] selectedColumns)Deprecated.Gets a submatrix.BigMatrixgetSubMatrix(int startRow, int endRow, int startColumn, int endColumn)Deprecated.Gets a submatrix.java.math.BigDecimalgetTrace()Deprecated.Returns the trace of the matrix (the sum of the elements on the main diagonal).BigMatrixinverse()Deprecated.Returns the inverse of this matrix.BigMatrixmultiply(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 vectorv.java.math.BigDecimal[]preMultiply(java.math.BigDecimal[] v)Deprecated.Returns the (row) vector result of premultiplying this by the vectorv.BigMatrixpreMultiply(BigMatrix m)Deprecated.Returns the result premultiplying this bym.BigMatrixscalarAdd(java.math.BigDecimal d)Deprecated.Returns the result of adding d to each entry of this.BigMatrixscalarMultiply(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.BigMatrixsolve(BigMatrix b)Deprecated.Returns a matrix of (column) solution vectors for linear systems with coefficient matrix = this and constant vectors = columns ofb.BigMatrixsubtract(BigMatrix m)Deprecated.Compute this minus m.BigMatrixtranspose()Deprecated.Returns the transpose of this matrix.- 
Methods inherited from interface org.apache.commons.math.linear.AnyMatrix
getColumnDimension, getRowDimension, isSquare 
 - 
 
 - 
 
- 
- 
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 bym.- 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
 
 
- 
getNorm
java.math.BigDecimal getNorm()
Deprecated.Returns the maximum absolute row sum norm of the matrix.- Returns:
 - norm
 
 
- 
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 indexendRow- Final row indexstartColumn- Initial column indexendColumn- 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 numberrowas 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 numbercolumnas 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 MatrixIndexExceptionDeprecated.Returns the entries in row numberrowas an array.Row indices start at 0. A
MatrixIndexExceptionis thrown unless0 <= 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 MatrixIndexExceptionDeprecated.Returns the entries in row numberrowas an array of double values.Row indices start at 0. A
MatrixIndexExceptionis thrown unless0 <= 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 MatrixIndexExceptionDeprecated.Returns the entries in column numbercolas an array.Column indices start at 0. A
MatrixIndexExceptionis thrown unless0 <= 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 MatrixIndexExceptionDeprecated.Returns the entries in column numbercolas an array of double values.Column indices start at 0. A
MatrixIndexExceptionis thrown unless0 <= 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 MatrixIndexExceptionDeprecated.Returns the entry in the specified row and column.Row and column indices start at 0 and must satisfy
0 <= row < rowDimension0 <= column < columnDimension
MatrixIndexExceptionis thrown.- Parameters:
 row- row location of entry to be fetchedcolumn- 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 MatrixIndexExceptionDeprecated.Returns the entry in the specified row and column as a double.Row and column indices start at 0 and must satisfy
0 <= row < rowDimension0 <= column < columnDimension
MatrixIndexExceptionis thrown.- Parameters:
 row- row location of entry to be fetchedcolumn- 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
 
 
- 
inverse
BigMatrix inverse() throws InvalidMatrixException
Deprecated.Returns the inverse of this matrix.- Returns:
 - inverse matrix
 - Throws:
 InvalidMatrixException- if this is not invertible
 
- 
getDeterminant
java.math.BigDecimal getDeterminant() throws InvalidMatrixExceptionDeprecated.Returns the determinant of this matrix.- Returns:
 - determinant
 - Throws:
 InvalidMatrixException- if matrix is not square
 
- 
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.IllegalArgumentExceptionDeprecated.Returns the result of multiplying this by the vectorv.- 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.IllegalArgumentExceptionDeprecated.Returns the (row) vector result of premultiplying this by the vectorv.- 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, InvalidMatrixExceptionDeprecated.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.lengthInvalidMatrixException- 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 ofb.- 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 dimensionInvalidMatrixException- if this matrix is not square or is singular
 
 - 
 
 -