|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface BasicMatrix
This interface declares a set of high level methods for linear algebra. Only the most basic set of matrix functionality is defined here. Various matrix decompositions may be used to do some of the more advanced tasks.
A vector is a matrix with column (or perhaps row) dimension 1.
LU,
Cholesky,
QR,
Eigenvalue,
SingularValue,
MatrixStore| Nested Class Summary | |
|---|---|
static interface |
BasicMatrix.Factory
|
| Method Summary | |
|---|---|
BasicMatrix |
add(BasicMatrix aMtrx)
Adds the elements of aMtrx to the elements of this matrix. |
BasicMatrix |
add(Number aNmbr)
Adds aNmbr to the elements of this. |
BasicMatrix |
conjugate()
For real matrices conjugate() and transpose() are identical. |
BasicMatrix |
divide(Number aNmbr)
Divides the elements of this with aNmbr. |
BasicMatrix |
divideElements(BasicMatrix aMtrx)
Divides the elements of this with the elements of aMtrx. |
double |
doubleValue(int aRow,
int aCol)
Extracts one element of this matrix as a double. |
BasicMatrix |
enforce(NumberContext aCntxt)
Deprecated. Since v27 Use round(NumberContext) instead. |
boolean |
equals(BasicMatrix aMtrx,
NumberContext aCntxt)
|
void |
flushCache()
BasicMatrix instances are intended to be immutable. |
int |
getColDim()
The size of this structure in the column-direction/dimension |
BasicMatrix |
getColumns(int[] someCols)
|
Scalar<?> |
getCondition()
|
Scalar<?> |
getDeterminant()
|
List<ComplexNumber> |
getEigenvalues()
|
Scalar<?> |
getFrobeniusNorm()
The Frobenius norm is the square root of the sum of the squares of each element, or the square root of the sum of the square of the singular values. |
Scalar<?> |
getInfinityNorm()
|
Scalar<?> |
getKyFanNorm(int k)
|
Scalar<?> |
getOneNorm()
|
Scalar<?> |
getOperatorNorm()
2-norm, max singular value |
int |
getRank()
The rank of a matrix is the (maximum) number of linearly independent rows or columns it contains. |
int |
getRowDim()
The size of this structure in the row-direction/dimension |
BasicMatrix |
getRows(int[] someRows)
|
List<? extends Number> |
getSingularValues()
|
Scalar<?> |
getTrace()
The sum of the diagonal elements. |
Scalar<?> |
getTraceNorm()
|
Scalar<?> |
getVectorNorm(int aDegree)
Treats [this] as if it is one dimensional (a vector) and calculates the vector norm. |
BasicMatrix |
invert()
About inverting matrices: |
boolean |
isEmpty()
Matrices are either square, tall, fat or empty. |
boolean |
isFat()
Matrices are either square, tall, fat or empty. |
boolean |
isFullRank()
|
boolean |
isHermitian()
|
boolean |
isScalar()
|
boolean |
isSquare()
Matrices are either square, tall, fat or empty. |
boolean |
isSymmetric()
|
boolean |
isTall()
Matrices are either square, tall, fat or empty. |
boolean |
isVector()
|
BasicMatrix |
mergeColumns(BasicMatrix aMtrx)
[aMtrx] is appended to the bottom of [this]. |
BasicMatrix |
mergeRows(BasicMatrix aMtrx)
[aMtrx] is appended to the right side of [this]. |
BasicMatrix |
multiply(Number aNmbr)
Multiplies the elements of this matrix with aNmbr. |
BasicMatrix |
multiplyElements(BasicMatrix aMtrx)
Multiplies the elements of this matrix with the elements of aMtrx. |
BasicMatrix |
multiplyLeft(BasicMatrix aMtrx)
Matrix multiplication: [aMtrx][this] The column dimension of the left matrix must equal the row dimension of the right matrix. |
BasicMatrix |
multiplyRight(BasicMatrix aMtrx)
Matrix multiplication: [this][aMtrx] The column dimension of the left matrix must equal the row dimension of the right matrix. |
Scalar<?> |
multiplyVectors(BasicMatrix aVctr)
Assumes that both [this] and [aVctr] have row or column dimension, doesn't matter which, equal to 1. |
BasicMatrix |
negate()
|
BasicMatrix |
round(NumberContext aCntxt)
|
BasicMatrix |
set(int aRow,
int aCol,
Number aNmbr)
Do not use this method to populate large dense matrices! Only use it to change a few (a small number) of elements. |
int |
size()
|
BasicMatrix |
solve(BasicMatrix aRHS)
This method solves a system of linear equations: [this][X]=[aRHS]. |
BasicMatrix |
subtract(BasicMatrix aMtrx)
Subtracts the elements of aMtrx from the elements of this matrix. |
BasicMatrix |
subtract(Number aNmbr)
Subtracts aNmbr from the elements of this matrix. |
BigDecimal |
toBigDecimal(int aRow,
int aCol)
Extracts one element of this matrix as a BigDecimal. |
PhysicalStore<BigDecimal> |
toBigStore()
Must be a copy that is safe to modify. |
ComplexNumber |
toComplexNumber(int aRow,
int aCol)
Extracts one element of this matrix as a ComplexNumber. |
PhysicalStore<ComplexNumber> |
toComplexStore()
Must be a copy that is safe to modify. |
List<BasicMatrix> |
toListOfColumns()
|
List<? extends Number> |
toListOfElements()
It is also possible to call toBigStore(), toComplexStore() or toPrimitiveStore() and then PhysicalStore.asList(). |
List<BasicMatrix> |
toListOfRows()
|
PhysicalStore<Double> |
toPrimitiveStore()
Must be a copy that is safe to modify. |
String |
toString(int aRow,
int aCol)
|
BasicMatrix |
transpose()
Transposes this matrix. |
| Methods inherited from interface org.ojalgo.access.Basic2D |
|---|
toScalar |
| Method Detail |
|---|
BasicMatrix add(BasicMatrix aMtrx)
aMtrx - What to add.
BasicMatrix add(Number aNmbr)
aNmbr - What to add
BasicMatrix conjugate()
transpose()BasicMatrix divide(Number aNmbr)
aNmbr - The denominator.
BasicMatrix divideElements(BasicMatrix aMtrx)
aMtrx - The denominator elements.
@Deprecated BasicMatrix enforce(NumberContext aCntxt)
round(NumberContext) instead.
boolean equals(BasicMatrix aMtrx,
NumberContext aCntxt)
void flushCache()
BasicMatrix getColumns(int[] someCols)
someCols - An ordered array of column indeces.
Scalar<?> getCondition()
Scalar<?> getDeterminant()
List<ComplexNumber> getEigenvalues()
Scalar<?> getFrobeniusNorm()
getFrobeniusNorm(),
getInfinityNorm(),
getKyFanNorm(int),
getOneNorm(),
getOperatorNorm(),
getTraceNorm(),
getVectorNorm(int)Scalar<?> getInfinityNorm()
getFrobeniusNorm(),
getInfinityNorm(),
getKyFanNorm(int),
getOneNorm(),
getOperatorNorm(),
getTraceNorm(),
getVectorNorm(int)Scalar<?> getKyFanNorm(int k)
getFrobeniusNorm(),
getInfinityNorm(),
getKyFanNorm(int),
getOneNorm(),
getOperatorNorm(),
getTraceNorm(),
getVectorNorm(int)Scalar<?> getOneNorm()
getFrobeniusNorm(),
getInfinityNorm(),
getKyFanNorm(int),
getOneNorm(),
getOperatorNorm(),
getTraceNorm(),
getVectorNorm(int)Scalar<?> getOperatorNorm()
getFrobeniusNorm(),
getInfinityNorm(),
getKyFanNorm(int),
getOneNorm(),
getOperatorNorm(),
getTraceNorm(),
getVectorNorm(int)int getRank()
BasicMatrix getRows(int[] someRows)
someRows - An ordered array of row indeces.
List<? extends Number> getSingularValues()
Scalar<?> getTrace()
Scalar<?> getTraceNorm()
getFrobeniusNorm(),
getInfinityNorm(),
getKyFanNorm(int),
getOneNorm(),
getOperatorNorm(),
getTraceNorm(),
getVectorNorm(int)Scalar<?> getVectorNorm(int aDegree)
getFrobeniusNorm(),
getInfinityNorm(),
getKyFanNorm(int),
getOneNorm(),
getOperatorNorm(),
getTraceNorm(),
getVectorNorm(int)BasicMatrix invert()
About inverting matrices:
boolean isEmpty()
boolean isFat()
boolean isFullRank()
boolean isHermitian()
boolean isScalar()
boolean isSquare()
boolean isSymmetric()
boolean isTall()
boolean isVector()
BasicMatrix mergeColumns(BasicMatrix aMtrx)
aMtrx - The matrix to merge.
BasicMatrix mergeRows(BasicMatrix aMtrx)
aMtrx - The matrix to merge.
BasicMatrix multiply(Number aNmbr)
aNmbr - What to multiply with.
BasicMatrix multiplyElements(BasicMatrix aMtrx)
aMtrx - The elements to multiply by.
BasicMatrix multiplyLeft(BasicMatrix aMtrx)
aMtrx - The left matrix.
multiplyRight(BasicMatrix)BasicMatrix multiplyRight(BasicMatrix aMtrx)
aMtrx - The right matrix.
multiplyLeft(BasicMatrix)Scalar<?> multiplyVectors(BasicMatrix aVctr)
BasicMatrix negate()
BasicMatrix round(NumberContext aCntxt)
BasicMatrix set(int aRow,
int aCol,
Number aNmbr)
BasicMatrix solve(BasicMatrix aRHS)
This method solves a system of linear equations: [this][X]=[aRHS]. A combination of columns in [this] should produce a column in [aRHS]. It is ok for [aRHS] to have more than 1 column.
Remember that: [X][this]=[aRHS] is equivalent to [this]T[X]T=[aRHS]T
aRHS - The right hand side of the equation.
BasicMatrix subtract(BasicMatrix aMtrx)
aMtrx - What to subtract.
BasicMatrix subtract(Number aNmbr)
aNmbr - What to subtract.
BigDecimal toBigDecimal(int aRow,
int aCol)
aRow - A row index.aCol - A column index.
PhysicalStore<BigDecimal> toBigStore()
toComplexStore(),
toPrimitiveStore()
ComplexNumber toComplexNumber(int aRow,
int aCol)
aRow - A row index.aCol - A column index.
PhysicalStore<ComplexNumber> toComplexStore()
toBigStore(),
toPrimitiveStore()List<BasicMatrix> toListOfColumns()
List<? extends Number> toListOfElements()
List<BasicMatrix> toListOfRows()
PhysicalStore<Double> toPrimitiveStore()
toBigStore(),
toComplexStore()
String toString(int aRow,
int aCol)
BasicMatrix transpose()
conjugate()
double doubleValue(int aRow,
int aCol)
aRow - A row index.aCol - A column index.
int getColDim()
int getRowDim()
int size()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||