Interface BigMatrix
- All Superinterfaces:
AnyMatrix
- All Known Implementing Classes:
BigMatrixImpl
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
Modifier and TypeMethodDescriptionDeprecated.Compute the sum of this and m.copy()
Deprecated.Returns a (deep) copy of this.getColumn
(int col) Deprecated.Returns the entries in column numbercol
as an array.double[]
getColumnAsDoubleArray
(int col) Deprecated.Returns the entries in column numbercol
as an array of double values.getColumnMatrix
(int column) Deprecated.Returns the entries in column numbercolumn
as a column matrix.BigDecimal[][]
getData()
Deprecated.Returns matrix entries as a two-dimensional array.double[][]
Deprecated.Returns matrix entries as a two-dimensional array.Deprecated.Returns the determinant of this matrix.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.getNorm()
Deprecated.Returns the maximum absolute row sum norm of the matrix.int
Deprecated.Gets the rounding modegetRow
(int row) Deprecated.Returns the entries in row numberrow
as an array.double[]
getRowAsDoubleArray
(int row) Deprecated.Returns the entries in row numberrow
as an array of double values.getRowMatrix
(int row) Deprecated.Returns the entries in row numberrow
as a row matrix.getSubMatrix
(int[] selectedRows, int[] selectedColumns) Deprecated.Gets a submatrix.getSubMatrix
(int startRow, int endRow, int startColumn, int endColumn) Deprecated.Gets a submatrix.getTrace()
Deprecated.Returns the trace of the matrix (the sum of the elements on the main diagonal).inverse()
Deprecated.Returns the inverse of this matrix.Deprecated.Returns the result of postmultiplying this by m.operate
(BigDecimal[] v) Deprecated.Returns the result of multiplying this by the vectorv
.preMultiply
(BigDecimal[] v) Deprecated.Returns the (row) vector result of premultiplying this by the vectorv
.Deprecated.Returns the result premultiplying this bym
.Deprecated.Returns the result of adding d to each entry of this.Deprecated.Returns the result multiplying each entry of this by d.solve
(BigDecimal[] b) Deprecated.Returns the solution vector for a linear system with coefficient matrix = this and constant vector =b
.Deprecated.Returns a matrix of (column) solution vectors for linear systems with coefficient matrix = this and constant vectors = columns ofb
.Deprecated.Compute this minus m.Deprecated.Returns the transpose of this matrix.Methods inherited from interface org.apache.commons.math.linear.AnyMatrix
getColumnDimension, getRowDimension, isSquare
-
Method Details
-
copy
BigMatrix copy()Deprecated.Returns a (deep) copy of this.- Returns:
- matrix copy
-
add
Deprecated.Compute the sum of this and m.- Parameters:
m
- matrix to be added- Returns:
- this + m
- Throws:
IllegalArgumentException
- if m is not the same size as this
-
subtract
Deprecated.Compute this minus m.- Parameters:
m
- matrix to be subtracted- Returns:
- this + m
- Throws:
IllegalArgumentException
- if m is not the same size as this
-
scalarAdd
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
Deprecated.Returns the result multiplying each entry of this by d.- Parameters:
d
- value to multiply all entries by- Returns:
- d * this
-
multiply
Deprecated.Returns the result of postmultiplying this by m.- Parameters:
m
- matrix to postmultiply by- Returns:
- this * m
- Throws:
IllegalArgumentException
- if columnDimension(this) != rowDimension(m)
-
preMultiply
Deprecated.Returns the result premultiplying this bym
.- Parameters:
m
- matrix to premultiply by- Returns:
- m * this
- Throws:
IllegalArgumentException
- if rowDimension(this) != columnDimension(m)
-
getData
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
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
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
Deprecated.Returns the entries in row numberrow
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
Deprecated.Returns the entries in column numbercolumn
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
Deprecated.Returns the entries in row numberrow
as an array.Row indices start at 0. A
MatrixIndexException
is thrown unless0 invalid input: '<'= row invalid input: '<' 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
Deprecated.Returns the entries in row numberrow
as an array of double values.Row indices start at 0. A
MatrixIndexException
is thrown unless0 invalid input: '<'= row invalid input: '<' 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
Deprecated.Returns the entries in column numbercol
as an array.Column indices start at 0. A
MatrixIndexException
is thrown unless0 invalid input: '<'= column invalid input: '<' 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
Deprecated.Returns the entries in column numbercol
as an array of double values.Column indices start at 0. A
MatrixIndexException
is thrown unless0 invalid input: '<'= column invalid input: '<' 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
Deprecated.Returns the entry in the specified row and column.Row and column indices start at 0 and must satisfy
0 invalid input: '<'= row invalid input: '<' rowDimension
0 invalid input: '<'= column invalid input: '<' columnDimension
MatrixIndexException
is 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
Deprecated.Returns the entry in the specified row and column as a double.Row and column indices start at 0 and must satisfy
0 invalid input: '<'= row invalid input: '<' rowDimension
0 invalid input: '<'= column invalid input: '<' columnDimension
MatrixIndexException
is 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
Deprecated.Returns the inverse of this matrix.- Returns:
- inverse matrix
- Throws:
InvalidMatrixException
- if this is not invertible
-
getDeterminant
Deprecated.Returns the determinant of this matrix.- Returns:
- determinant
- Throws:
InvalidMatrixException
- if matrix is not square
-
getTrace
BigDecimal getTrace()Deprecated.Returns the trace of the matrix (the sum of the elements on the main diagonal).- Returns:
- trace
-
operate
Deprecated.Returns the result of multiplying this by the vectorv
.- Parameters:
v
- the vector to operate on- Returns:
- this*v
- Throws:
IllegalArgumentException
- if columnDimension != v.size()
-
preMultiply
Deprecated.Returns the (row) vector result of premultiplying this by the vectorv
.- Parameters:
v
- the row vector to premultiply by- Returns:
- v*this
- Throws:
IllegalArgumentException
- if rowDimension != v.size()
-
solve
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:
IllegalArgumentException
- if this.rowDimension != b.lengthInvalidMatrixException
- if this matrix is not square or is singular
-
solve
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:
IllegalArgumentException
- if this.rowDimension != row dimensionInvalidMatrixException
- if this matrix is not square or is singular
-
FieldMatrix
with aBigReal
parameter