|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ojalgo.matrix.jama.JamaMatrix
public final class JamaMatrix
This class adapts JAMA's Matrix to ojAlgo's BasicMatrix and PhysicalStore interfaces.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.ojalgo.matrix.BasicMatrix |
|---|
BasicMatrix.Factory |
| Nested classes/interfaces inherited from interface org.ojalgo.matrix.store.PhysicalStore |
|---|
PhysicalStore.Factory<N extends Number> |
| Nested classes/interfaces inherited from interface org.ojalgo.matrix.store.MatrixStore |
|---|
MatrixStore.Builder<N extends Number> |
| Field Summary | |
|---|---|
static JamaFactory |
FACTORY
|
| Constructor Summary | |
|---|---|
JamaMatrix(BasicMatrix aMtrx)
|
|
JamaMatrix(MatrixStore<Double> aStore)
|
|
| Method Summary | |
|---|---|
JamaMatrix |
add(BasicMatrix aMtrx)
Adds the elements of aMtrx to the elements of this matrix. |
JamaMatrix |
add(Number aNmbr)
Adds aNmbr to the elements of this. |
Double |
aggregateAll(ChainableAggregator aVisitor)
|
Double |
aggregateAll(CollectableAggregator aVisitor)
|
List<Double> |
asList()
|
MatrixStore.Builder<Double> |
builder()
|
void |
caxpy(Double aSclrA,
int aColX,
int aColY,
int aFirstRow)
column a * x plus y |
JamaMatrix |
conjugate()
For real matrices conjugate() and transpose() are identical. |
PhysicalStore<Double> |
copy()
Each call must produce a new instance. |
JamaMatrix |
divide(Number aNmbr)
Divides the elements of this with aNmbr. |
JamaMatrix |
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. |
JamaMatrix |
enforce(NumberContext aContext)
|
boolean |
equals(BasicMatrix aMtrx,
NumberContext aCntxt)
|
boolean |
equals(MatrixStore<Double> aStore,
NumberContext aCntxt)
|
boolean |
equals(Object anObject)
|
void |
exchangeColumns(int aColA,
int aColB)
|
void |
exchangeRows(int aRowA,
int aRowB)
|
void |
fillAll(Double aNmbr)
|
void |
fillByMultiplying(MatrixStore<Double> aLeftArg,
MatrixStore<Double> aRightArg)
|
void |
fillColumn(int aRow,
int aCol,
Double aNmbr)
|
void |
fillDiagonal(int aRow,
int aCol,
Double aNmbr)
|
void |
fillMatching(Access2D<Double> aSource2D)
|
void |
fillMatching(Double aLeftArg,
BinaryFunction<Double> aFunc,
MatrixStore<Double> aRightArg)
Will replace the elements of [this] with the results of element wise invocation of the input binary funtion: |
void |
fillMatching(MatrixStore<Double> aLeftArg,
BinaryFunction<Double> aFunc,
Double aRightArg)
Will replace the elements of [this] with the results of element wise invocation of the input binary funtion: |
void |
fillMatching(MatrixStore<Double> aLeftArg,
BinaryFunction<Double> aFunc,
MatrixStore<Double> aRightArg)
Will replace the elements of [this] with the results of element wise invocation of the input binary funtion: |
void |
fillRow(int aRow,
int aCol,
Double aNmbr)
|
void |
flushCache()
BasicMatrix instances are intended to be immutable. |
Householder<Double> |
generateHouseholderColumn(int newI,
int newIj)
|
Householder<Double> |
generateHouseholderRow(int newIj,
int newI)
|
Double |
get(int aRow,
int aCol)
|
int |
getColDim()
|
JamaMatrix |
getColumns(int[] someCols)
|
Scalar<Double> |
getCondition()
|
PrimitiveScalar |
getDeterminant()
|
List<ComplexNumber> |
getEigenvalues()
|
PhysicalStore.Factory<Double> |
getFactory()
|
PrimitiveScalar |
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. |
int |
getIndexOfLargestInColumn(int aRow,
int aCol)
|
int |
getIndexOfLargestInRow(int aRow,
int aCol)
|
Scalar<?> |
getInfinityNorm()
|
PrimitiveScalar |
getKyFanNorm(int k)
|
int |
getMinDim()
|
Double |
getNumber(int aRow,
int aCol)
Deprecated. Use get(int,int) instead |
Scalar<?> |
getOneNorm()
|
PrimitiveScalar |
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()
|
JamaMatrix |
getRows(int[] someRows)
|
List<Double> |
getSingularValues()
|
PrimitiveScalar |
getTrace()
The sum of the diagonal elements. |
PrimitiveScalar |
getTraceNorm()
|
PrimitiveScalar |
getVectorInfinityNorm()
The largest, absolute, element value. |
PrimitiveScalar |
getVectorNorm(int aDegree)
Treats [this] as if it is one dimensional (a vector) and calculates the vector norm. |
PrimitiveScalar |
getVectorZeroNorm()
|
int |
hashCode()
|
JamaMatrix |
invert()
About inverting matrices: |
boolean |
isAbsolute(int aRow,
int aCol)
|
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 |
isLowerLeftShaded()
The lower (left) triangle is shaded leaving an upper Hessenberg matrix. |
boolean |
isReal(int aRow,
int aCol)
|
boolean |
isScalar()
|
boolean |
isShaded()
Either the lower (left) or the upper (right) triangles are shaded. |
boolean |
isSquare()
Matrices are either square, tall, fat or empty. |
boolean |
isSymmetric()
|
boolean |
isTall()
Matrices are either square, tall, fat or empty. |
boolean |
isUpperRightShaded()
The upper (right) triangle is shaded leaving a lower Hessenberg matrix. |
boolean |
isVector()
|
boolean |
isZero(int aRow,
int aCol)
|
void |
maxpy(Double aSclrA,
MatrixStore<Double> aMtrxX)
matrix a * x plus y |
JamaMatrix |
mergeColumns(BasicMatrix aMtrx)
[aMtrx] is appended to the bottom of [this]. |
JamaMatrix |
mergeRows(BasicMatrix aMtrx)
[aMtrx] is appended to the right side of [this]. |
void |
modifyAll(UnaryFunction<Double> aFunc)
|
void |
modifyColumn(int aRow,
int aCol,
UnaryFunction<Double> aFunc)
|
void |
modifyDiagonal(int aRow,
int aCol,
UnaryFunction<Double> aFunc)
|
void |
modifyRow(int aRow,
int aCol,
UnaryFunction<Double> aFunc)
|
JamaMatrix |
multiply(Number aNmbr)
Multiplies the elements of this matrix with aNmbr. |
JamaMatrix |
multiplyElements(BasicMatrix aMtrx)
Multiplies the elements of this matrix with the elements of aMtrx. |
JamaMatrix |
multiplyLeft(BasicMatrix aMtrx)
Matrix multiplication: [aMtrx][this] The column dimension of the left matrix must equal the row dimension of the right matrix. |
JamaMatrix |
multiplyLeft(MatrixStore<Double> aStore)
|
JamaMatrix |
multiplyRight(BasicMatrix aMtrx)
Matrix multiplication: [this][aMtrx] The column dimension of the left matrix must equal the row dimension of the right matrix. |
JamaMatrix |
multiplyRight(MatrixStore<Double> aStore)
|
PrimitiveScalar |
multiplyVectors(BasicMatrix aVctr)
Assumes that both [this] and [aVctr] have row or column dimension, doesn't matter which, equal to 1. |
JamaMatrix |
negate()
|
void |
raxpy(Double aSclrA,
int aRowX,
int aRowY,
int aFirstCol)
row a * x plus y |
JamaMatrix |
round(NumberContext aCntxt)
|
void |
set(int aRow,
int aCol,
double aNmbr)
|
void |
set(int aRow,
int aCol,
Double aNmbr)
|
JamaMatrix |
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. |
void |
shadeLowerLeft()
Shades the lower (left) triangle, leaving an upper Hessenberg matrix. |
void |
shadeUpperRight()
Shades the upper (right) triangle, leaving a lower Hessenberg matrix. |
int |
size()
|
JamaMatrix |
solve(BasicMatrix aRHS)
This method solves a system of linear equations: [this][X]=[aRHS]. |
void |
substituteBackwards(Access2D<Double> aBody,
boolean someAssumeOne,
boolean someTransposed)
Will solve the equation system [A][X]=[B] where: [aBody][this]=[this] is [A][X]=[B] ("this" is the right hand side, and it will be overwritten with the solution). [A] is upper/right triangular |
void |
substituteBackwards(MatrixStore<Double> aBody,
boolean newAssumeOne)
Deprecated. Use #substituteBackwards(MatrixStore instead |
void |
substituteBackwards(MatrixStore<Double> aBody,
boolean newAssumeOne,
boolean transposed)
|
void |
substituteForwards(Access2D<Double> aBody,
boolean someAssumeOne,
boolean someTransposed)
Will solve the equation system [A][X]=[B] where: [aBody][this]=[this] is [A][X]=[B] ("this" is the right hand side, and it will be overwritten with the solution). [A] is lower/left triangular |
void |
substituteForwards(MatrixStore<Double> aBody,
boolean newAssumeOne)
Deprecated. Use #substituteForwards(MatrixStore instead |
void |
substituteForwards(MatrixStore<Double> aBody,
boolean newAssumeOne,
boolean transposed)
|
JamaMatrix |
subtract(BasicMatrix aMtrx)
Subtracts the elements of aMtrx from the elements of this matrix. |
JamaMatrix |
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<Double> |
toListOfElements()
It is also possible to call BasicMatrix.toBigStore(), BasicMatrix.toComplexStore() or BasicMatrix.toPrimitiveStore() and then PhysicalStore.asList(). |
List<BasicMatrix> |
toListOfRows()
|
JamaMatrix |
toPrimitiveStore()
Must be a copy that is safe to modify. |
double[][] |
toRawCopy()
|
PrimitiveScalar |
toScalar(int aRow,
int aCol)
Extracts one element of this matrix as a Scalar. |
String |
toString()
|
String |
toString(int aRow,
int aCol)
|
void |
transformLeft(Householder<Double> aTransf)
|
void |
transformLeft(Householder<Double> aTransf,
int aFirstCol)
|
void |
transformLeft(Rotation<Double> aTransf)
As in MatrixStore.multiplyLeft(MatrixStore) where the
left/parameter matrix is a plane rotation. |
void |
transformRight(Householder<Double> aTransf)
|
void |
transformRight(Householder<Double> aTransf,
int aFirstRow)
|
void |
transformRight(Rotation<Double> aTransf)
As in MatrixStore.multiplyRight(MatrixStore) where the
right/parameter matrix is a plane rotation. |
JamaMatrix |
transpose()
Transposes this matrix. |
void |
unshade()
Unshades both the lower (left) and upper (right) triangles. |
void |
update(int[] someRows,
int[] someColumns,
JamaMatrix aMtrx)
|
void |
update(int[] someRows,
int aFirstCol,
int aColCount,
JamaMatrix aMtrx)
|
void |
update(int aFirstRow,
int aRowCount,
int[] someColumns,
JamaMatrix aMtrx)
|
void |
update(int aFirstRow,
int aRowCount,
int aFirstCol,
int aColCount,
JamaMatrix aMtrx)
|
void |
update(int aRow,
int aCol,
Number aNmbr)
|
void |
visitAll(AggregatorFunction<Double> aVisitor)
|
void |
visitColumn(int aRow,
int aCol,
AggregatorFunction<Double> aVisitor)
|
void |
visitDiagonal(int aRow,
int aCol,
AggregatorFunction<Double> aVisitor)
|
void |
visitRow(int aRow,
int aCol,
AggregatorFunction<Double> aVisitor)
|
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final JamaFactory FACTORY
| Constructor Detail |
|---|
public JamaMatrix(BasicMatrix aMtrx)
public JamaMatrix(MatrixStore<Double> aStore)
| Method Detail |
|---|
public JamaMatrix add(BasicMatrix aMtrx)
BasicMatrix
add in interface BasicMatrixaMtrx - What to add.
public JamaMatrix add(Number aNmbr)
BasicMatrix
add in interface BasicMatrixaNmbr - What to add
public Double aggregateAll(ChainableAggregator aVisitor)
aggregateAll in interface MatrixStore<Double>public Double aggregateAll(CollectableAggregator aVisitor)
aggregateAll in interface MatrixStore<Double>public List<Double> asList()
asList in interface PhysicalStore<Double>public final MatrixStore.Builder<Double> builder()
builder in interface MatrixStore<Double>
public void caxpy(Double aSclrA,
int aColX,
int aColY,
int aFirstRow)
PhysicalStorecolumn a * x plus y
[this(*,aColY)] = aSclrA [this(*,aColX)] + [this(*,aColY)]
caxpy in interface PhysicalStore<Double>public JamaMatrix conjugate()
BasicMatrix
conjugate in interface BasicMatrixconjugate in interface MatrixStore<Double>BasicMatrix.transpose()public PhysicalStore<Double> copy()
MatrixStore
copy in interface MatrixStore<Double>public JamaMatrix divide(Number aNmbr)
BasicMatrix
divide in interface BasicMatrixaNmbr - The denominator.
public JamaMatrix divideElements(BasicMatrix aMtrx)
BasicMatrix
divideElements in interface BasicMatrixaMtrx - The denominator elements.
public double doubleValue(int aRow,
int aCol)
BasicMatrix
doubleValue in interface Access2D<Double>doubleValue in interface BasicMatrixaRow - A row index.aCol - A column index.
public JamaMatrix enforce(NumberContext aContext)
enforce in interface BasicMatrix
public final boolean equals(BasicMatrix aMtrx,
NumberContext aCntxt)
equals in interface BasicMatrix
public boolean equals(MatrixStore<Double> aStore,
NumberContext aCntxt)
equals in interface MatrixStore<Double>public final boolean equals(Object anObject)
equals in class Object
public void exchangeColumns(int aColA,
int aColB)
exchangeColumns in interface PhysicalStore<Double>
public void exchangeRows(int aRowA,
int aRowB)
exchangeRows in interface PhysicalStore<Double>public void fillAll(Double aNmbr)
fillAll in interface PhysicalStore<Double>
public void fillByMultiplying(MatrixStore<Double> aLeftArg,
MatrixStore<Double> aRightArg)
fillByMultiplying in interface PhysicalStore<Double>
public void fillColumn(int aRow,
int aCol,
Double aNmbr)
fillColumn in interface PhysicalStore<Double>
public void fillDiagonal(int aRow,
int aCol,
Double aNmbr)
fillDiagonal in interface PhysicalStore<Double>public void fillMatching(Access2D<Double> aSource2D)
fillMatching in interface PhysicalStore<Double>
public void fillMatching(Double aLeftArg,
BinaryFunction<Double> aFunc,
MatrixStore<Double> aRightArg)
PhysicalStoreWill replace the elements of [this] with the results of element wise invocation of the input binary funtion:
this(i,j) = aFunc.invoke(aLeftArg,aRightArg(i,j))
fillMatching in interface PhysicalStore<Double>
public void fillMatching(MatrixStore<Double> aLeftArg,
BinaryFunction<Double> aFunc,
Double aRightArg)
PhysicalStoreWill replace the elements of [this] with the results of element wise invocation of the input binary funtion:
this(i,j) = aFunc.invoke(aLeftArg(i,j),aRightArg))
fillMatching in interface PhysicalStore<Double>
public void fillMatching(MatrixStore<Double> aLeftArg,
BinaryFunction<Double> aFunc,
MatrixStore<Double> aRightArg)
PhysicalStoreWill replace the elements of [this] with the results of element wise invocation of the input binary funtion:
this(i,j) = aFunc.invoke(aLeftArg(i,j),aRightArg(i,j))
fillMatching in interface PhysicalStore<Double>
public void fillRow(int aRow,
int aCol,
Double aNmbr)
fillRow in interface PhysicalStore<Double>public void flushCache()
BasicMatrix
flushCache in interface BasicMatrix
public Householder<Double> generateHouseholderColumn(int newI,
int newIj)
generateHouseholderColumn in interface PhysicalStore<Double>
public Householder<Double> generateHouseholderRow(int newIj,
int newI)
generateHouseholderRow in interface PhysicalStore<Double>
public Double get(int aRow,
int aCol)
get in interface Access2D<Double>public int getColDim()
getColDim in interface BasicMatrixpublic JamaMatrix getColumns(int[] someCols)
getColumns in interface BasicMatrixsomeCols - An ordered array of column indeces.
public Scalar<Double> getCondition()
getCondition in interface BasicMatrixpublic PrimitiveScalar getDeterminant()
getDeterminant in interface BasicMatrixpublic List<ComplexNumber> getEigenvalues()
getEigenvalues in interface BasicMatrixpublic PhysicalStore.Factory<Double> getFactory()
getFactory in interface MatrixStore<Double>public PrimitiveScalar getFrobeniusNorm()
BasicMatrix
getFrobeniusNorm in interface BasicMatrixBasicMatrix.getFrobeniusNorm(),
BasicMatrix.getInfinityNorm(),
BasicMatrix.getKyFanNorm(int),
BasicMatrix.getOneNorm(),
BasicMatrix.getOperatorNorm(),
BasicMatrix.getTraceNorm(),
BasicMatrix.getVectorInfinityNorm(),
BasicMatrix.getVectorNorm(int),
BasicMatrix.getVectorZeroNorm()
public int getIndexOfLargestInColumn(int aRow,
int aCol)
getIndexOfLargestInColumn in interface PhysicalStore<Double>
public int getIndexOfLargestInRow(int aRow,
int aCol)
getIndexOfLargestInRow in interface PhysicalStore<Double>public Scalar<?> getInfinityNorm()
getInfinityNorm in interface BasicMatrixBasicMatrix.getFrobeniusNorm(),
BasicMatrix.getInfinityNorm(),
BasicMatrix.getKyFanNorm(int),
BasicMatrix.getOneNorm(),
BasicMatrix.getOperatorNorm(),
BasicMatrix.getTraceNorm(),
BasicMatrix.getVectorInfinityNorm(),
BasicMatrix.getVectorNorm(int),
BasicMatrix.getVectorZeroNorm()public PrimitiveScalar getKyFanNorm(int k)
getKyFanNorm in interface BasicMatrixBasicMatrix.getFrobeniusNorm(),
BasicMatrix.getInfinityNorm(),
BasicMatrix.getKyFanNorm(int),
BasicMatrix.getOneNorm(),
BasicMatrix.getOperatorNorm(),
BasicMatrix.getTraceNorm(),
BasicMatrix.getVectorInfinityNorm(),
BasicMatrix.getVectorNorm(int),
BasicMatrix.getVectorZeroNorm()public int getMinDim()
@Deprecated
public Double getNumber(int aRow,
int aCol)
get(int,int) instead
public Scalar<?> getOneNorm()
getOneNorm in interface BasicMatrixBasicMatrix.getFrobeniusNorm(),
BasicMatrix.getInfinityNorm(),
BasicMatrix.getKyFanNorm(int),
BasicMatrix.getOneNorm(),
BasicMatrix.getOperatorNorm(),
BasicMatrix.getTraceNorm(),
BasicMatrix.getVectorInfinityNorm(),
BasicMatrix.getVectorNorm(int),
BasicMatrix.getVectorZeroNorm()public PrimitiveScalar getOperatorNorm()
BasicMatrix
getOperatorNorm in interface BasicMatrixBasicMatrix.getFrobeniusNorm(),
BasicMatrix.getInfinityNorm(),
BasicMatrix.getKyFanNorm(int),
BasicMatrix.getOneNorm(),
BasicMatrix.getOperatorNorm(),
BasicMatrix.getTraceNorm(),
BasicMatrix.getVectorInfinityNorm(),
BasicMatrix.getVectorNorm(int),
BasicMatrix.getVectorZeroNorm()public int getRank()
BasicMatrix
getRank in interface BasicMatrixpublic int getRowDim()
getRowDim in interface BasicMatrixpublic JamaMatrix getRows(int[] someRows)
getRows in interface BasicMatrixsomeRows - An ordered array of row indeces.
public List<Double> getSingularValues()
getSingularValues in interface BasicMatrixpublic PrimitiveScalar getTrace()
BasicMatrix
getTrace in interface BasicMatrixpublic PrimitiveScalar getTraceNorm()
getTraceNorm in interface BasicMatrixBasicMatrix.getFrobeniusNorm(),
BasicMatrix.getInfinityNorm(),
BasicMatrix.getKyFanNorm(int),
BasicMatrix.getOneNorm(),
BasicMatrix.getOperatorNorm(),
BasicMatrix.getTraceNorm(),
BasicMatrix.getVectorInfinityNorm(),
BasicMatrix.getVectorNorm(int),
BasicMatrix.getVectorZeroNorm()public PrimitiveScalar getVectorInfinityNorm()
BasicMatrix
getVectorInfinityNorm in interface BasicMatrixBasicMatrix.getFrobeniusNorm(),
BasicMatrix.getInfinityNorm(),
BasicMatrix.getKyFanNorm(int),
BasicMatrix.getOneNorm(),
BasicMatrix.getOperatorNorm(),
BasicMatrix.getTraceNorm(),
BasicMatrix.getVectorInfinityNorm(),
BasicMatrix.getVectorNorm(int),
BasicMatrix.getVectorZeroNorm()public PrimitiveScalar getVectorNorm(int aDegree)
BasicMatrix
getVectorNorm in interface BasicMatrixBasicMatrix.getFrobeniusNorm(),
BasicMatrix.getInfinityNorm(),
BasicMatrix.getKyFanNorm(int),
BasicMatrix.getOneNorm(),
BasicMatrix.getOperatorNorm(),
BasicMatrix.getTraceNorm(),
BasicMatrix.getVectorInfinityNorm(),
BasicMatrix.getVectorNorm(int),
BasicMatrix.getVectorZeroNorm()public PrimitiveScalar getVectorZeroNorm()
getVectorZeroNorm in interface BasicMatrixBasicMatrix.getFrobeniusNorm(),
BasicMatrix.getInfinityNorm(),
BasicMatrix.getKyFanNorm(int),
BasicMatrix.getOneNorm(),
BasicMatrix.getOperatorNorm(),
BasicMatrix.getTraceNorm(),
BasicMatrix.getVectorInfinityNorm(),
BasicMatrix.getVectorNorm(int),
BasicMatrix.getVectorZeroNorm()public final int hashCode()
hashCode in class Objectpublic JamaMatrix invert()
BasicMatrixAbout inverting matrices:
invert in interface BasicMatrix
public boolean isAbsolute(int aRow,
int aCol)
isAbsolute in interface MatrixStore<Double>Scalar.isAbsolute()public boolean isEmpty()
BasicMatrix
isEmpty in interface BasicMatrixpublic boolean isFat()
BasicMatrix
isFat in interface BasicMatrixpublic boolean isFullRank()
isFullRank in interface BasicMatrixpublic boolean isHermitian()
isHermitian in interface BasicMatrixpublic boolean isLowerLeftShaded()
MatrixStoreThe lower (left) triangle is shaded leaving an upper Hessenberg matrix.
isLowerLeftShaded in interface MatrixStore<Double>MatrixStore.isUpperRightShaded(),
MatrixStore.isShaded(),
PhysicalStore.shadeLowerLeft(),
PhysicalStore.unshade()
public boolean isReal(int aRow,
int aCol)
isReal in interface MatrixStore<Double>Scalar.isReal()public boolean isScalar()
isScalar in interface BasicMatrixpublic boolean isShaded()
MatrixStoreEither the lower (left) or the upper (right) triangles are shaded.
Shading part of a MatrixStore causes that
part to be ignored (as if it had zero valued elements) when doing matrix
multiplication. It is possible to shade part of a
PhysicalStore even though the shaded
elements are not actually zero valued. Calling doubleValue(i, j),
getNumber(i, j) or toScalar(i, j) will return the actual
stored value.
isShaded in interface MatrixStore<Double>MatrixStore.isLowerLeftShaded(),
MatrixStore.isUpperRightShaded(),
PhysicalStore.unshade()public boolean isSquare()
BasicMatrix
isSquare in interface BasicMatrixpublic boolean isSymmetric()
isSymmetric in interface BasicMatrixpublic boolean isTall()
BasicMatrix
isTall in interface BasicMatrixpublic boolean isUpperRightShaded()
MatrixStoreThe upper (right) triangle is shaded leaving a lower Hessenberg matrix.
isUpperRightShaded in interface MatrixStore<Double>MatrixStore.isLowerLeftShaded(),
MatrixStore.isShaded(),
PhysicalStore.shadeUpperRight(),
PhysicalStore.unshade()public boolean isVector()
isVector in interface BasicMatrix
public boolean isZero(int aRow,
int aCol)
isZero in interface MatrixStore<Double>Scalar.isZero()
public void maxpy(Double aSclrA,
MatrixStore<Double> aMtrxX)
PhysicalStorematrix a * x plus y
[this] = aSclrA [aMtrxX] + [this]
maxpy in interface PhysicalStore<Double>public JamaMatrix mergeColumns(BasicMatrix aMtrx)
BasicMatrix
mergeColumns in interface BasicMatrixaMtrx - The matrix to merge.
public JamaMatrix mergeRows(BasicMatrix aMtrx)
BasicMatrix
mergeRows in interface BasicMatrixaMtrx - The matrix to merge.
public void modifyAll(UnaryFunction<Double> aFunc)
modifyAll in interface PhysicalStore<Double>
public void modifyColumn(int aRow,
int aCol,
UnaryFunction<Double> aFunc)
modifyColumn in interface PhysicalStore<Double>
public void modifyDiagonal(int aRow,
int aCol,
UnaryFunction<Double> aFunc)
modifyDiagonal in interface PhysicalStore<Double>
public void modifyRow(int aRow,
int aCol,
UnaryFunction<Double> aFunc)
modifyRow in interface PhysicalStore<Double>public JamaMatrix multiply(Number aNmbr)
BasicMatrix
multiply in interface BasicMatrixaNmbr - What to multiply with.
public JamaMatrix multiplyElements(BasicMatrix aMtrx)
BasicMatrix
multiplyElements in interface BasicMatrixaMtrx - The elements to multiply by.
public JamaMatrix multiplyLeft(BasicMatrix aMtrx)
BasicMatrix
multiplyLeft in interface BasicMatrixaMtrx - The left matrix.
BasicMatrix.multiplyRight(BasicMatrix)public JamaMatrix multiplyLeft(MatrixStore<Double> aStore)
multiplyLeft in interface MatrixStore<Double>public JamaMatrix multiplyRight(BasicMatrix aMtrx)
BasicMatrix
multiplyRight in interface BasicMatrixaMtrx - The right matrix.
BasicMatrix.multiplyLeft(BasicMatrix)public JamaMatrix multiplyRight(MatrixStore<Double> aStore)
multiplyRight in interface MatrixStore<Double>public PrimitiveScalar multiplyVectors(BasicMatrix aVctr)
BasicMatrix
multiplyVectors in interface BasicMatrixpublic JamaMatrix negate()
negate in interface BasicMatrix
public void raxpy(Double aSclrA,
int aRowX,
int aRowY,
int aFirstCol)
PhysicalStorerow a * x plus y
[this(aRowY,*)] = aSclrA [this(aRowX,*)] + [this(aRowY,*)]
raxpy in interface PhysicalStore<Double>public JamaMatrix round(NumberContext aCntxt)
round in interface BasicMatrix
public void set(int aRow,
int aCol,
double aNmbr)
set in interface PhysicalStore<Double>
public void set(int aRow,
int aCol,
Double aNmbr)
set in interface PhysicalStore<Double>
public JamaMatrix set(int aRow,
int aCol,
Number aNmbr)
BasicMatrix
set in interface BasicMatrixpublic void shadeLowerLeft()
PhysicalStoreShades the lower (left) triangle, leaving an upper Hessenberg matrix.
shadeLowerLeft in interface PhysicalStore<Double>PhysicalStore.unshade()public void shadeUpperRight()
PhysicalStoreShades the upper (right) triangle, leaving a lower Hessenberg matrix.
shadeUpperRight in interface PhysicalStore<Double>PhysicalStore.unshade()public int size()
size in interface BasicMatrixpublic JamaMatrix solve(BasicMatrix aRHS)
BasicMatrixThis 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
solve in interface BasicMatrixaRHS - The right hand side of the equation.
public void substituteBackwards(Access2D<Double> aBody,
boolean someAssumeOne,
boolean someTransposed)
PhysicalStore
substituteBackwards in interface PhysicalStore<Double>aBody - The equation system body parameters [A]someAssumeOne - true if aBody as ones on the diagonalsomeTransposed - true if the upper/right part of aBody is
actually stored in the lower/left part of the matrix.
@Deprecated
public void substituteBackwards(MatrixStore<Double> aBody,
boolean newAssumeOne)
#substituteBackwards(MatrixStore,boolean,boolean) instead
substituteBackwards in interface PhysicalStore<Double>
public void substituteBackwards(MatrixStore<Double> aBody,
boolean newAssumeOne,
boolean transposed)
public void substituteForwards(Access2D<Double> aBody,
boolean someAssumeOne,
boolean someTransposed)
PhysicalStore
substituteForwards in interface PhysicalStore<Double>aBody - The equation system body parameters [A]someAssumeOne - true if aBody as ones on the diagonalsomeTransposed - true if the lower/left part of aBody is
actually stored in the upper/right part of the matrix.
@Deprecated
public void substituteForwards(MatrixStore<Double> aBody,
boolean newAssumeOne)
#substituteForwards(MatrixStore,boolean,boolean) instead
substituteForwards in interface PhysicalStore<Double>
public void substituteForwards(MatrixStore<Double> aBody,
boolean newAssumeOne,
boolean transposed)
public JamaMatrix subtract(BasicMatrix aMtrx)
BasicMatrix
subtract in interface BasicMatrixaMtrx - What to subtract.
public JamaMatrix subtract(Number aNmbr)
BasicMatrix
subtract in interface BasicMatrixaNmbr - What to subtract.
public BigDecimal toBigDecimal(int aRow,
int aCol)
BasicMatrix
toBigDecimal in interface BasicMatrixaRow - A row index.aCol - A column index.
public PhysicalStore<BigDecimal> toBigStore()
BasicMatrix
toBigStore in interface BasicMatrixBasicMatrix.toComplexStore(),
BasicMatrix.toPrimitiveStore()
public ComplexNumber toComplexNumber(int aRow,
int aCol)
BasicMatrix
toComplexNumber in interface BasicMatrixaRow - A row index.aCol - A column index.
public PhysicalStore<ComplexNumber> toComplexStore()
BasicMatrix
toComplexStore in interface BasicMatrixBasicMatrix.toBigStore(),
BasicMatrix.toPrimitiveStore()public List<BasicMatrix> toListOfColumns()
toListOfColumns in interface BasicMatrixpublic List<Double> toListOfElements()
BasicMatrix
toListOfElements in interface BasicMatrixpublic List<BasicMatrix> toListOfRows()
toListOfRows in interface BasicMatrixpublic JamaMatrix toPrimitiveStore()
BasicMatrix
toPrimitiveStore in interface BasicMatrixBasicMatrix.toBigStore(),
BasicMatrix.toComplexStore()public double[][] toRawCopy()
toRawCopy in interface MatrixStore<Double>
public PrimitiveScalar toScalar(int aRow,
int aCol)
BasicMatrix
toScalar in interface Access2D<Double>toScalar in interface BasicMatrixaRow - A row index.aCol - A column index.
public String toString()
toString in class Object
public String toString(int aRow,
int aCol)
toString in interface BasicMatrixpublic void transformLeft(Householder<Double> aTransf)
transformLeft in interface PhysicalStore<Double>
public void transformLeft(Householder<Double> aTransf,
int aFirstCol)
transformLeft in interface PhysicalStore<Double>public void transformLeft(Rotation<Double> aTransf)
PhysicalStore
As in MatrixStore.multiplyLeft(MatrixStore) where the
left/parameter matrix is a plane rotation.
Multiplying by a plane rotation from the left means that [this] gets two of its rows updated to new combinations of those two (current) rows.
There are two ways to transpose/invert a rotation. Either you negate the angle or you interchange the two indeces that define the rotation plane.
transformLeft in interface PhysicalStore<Double>PhysicalStore.transformRight(Rotation)public void transformRight(Householder<Double> aTransf)
transformRight in interface PhysicalStore<Double>
public void transformRight(Householder<Double> aTransf,
int aFirstRow)
transformRight in interface PhysicalStore<Double>public void transformRight(Rotation<Double> aTransf)
PhysicalStore
As in MatrixStore.multiplyRight(MatrixStore) where the
right/parameter matrix is a plane rotation.
Multiplying by a plane rotation from the right means that [this] gets two of its columns updated to new combinations of those two (current) columns.
There result is undefined if the two input indeces are the same (in which case the rotation plane is undefined).
transformRight in interface PhysicalStore<Double>PhysicalStore.transformLeft(Rotation)public JamaMatrix transpose()
BasicMatrix
transpose in interface BasicMatrixtranspose in interface MatrixStore<Double>BasicMatrix.conjugate()public void unshade()
PhysicalStore
unshade in interface PhysicalStore<Double>PhysicalStore.shadeLowerLeft(),
PhysicalStore.shadeUpperRight()
public final void update(int aFirstRow,
int aRowCount,
int aFirstCol,
int aColCount,
JamaMatrix aMtrx)
public final void update(int aFirstRow,
int aRowCount,
int[] someColumns,
JamaMatrix aMtrx)
public final void update(int aRow,
int aCol,
Number aNmbr)
public final void update(int[] someRows,
int aFirstCol,
int aColCount,
JamaMatrix aMtrx)
public final void update(int[] someRows,
int[] someColumns,
JamaMatrix aMtrx)
public void visitAll(AggregatorFunction<Double> aVisitor)
visitAll in interface MatrixStore<Double>
public void visitColumn(int aRow,
int aCol,
AggregatorFunction<Double> aVisitor)
visitColumn in interface MatrixStore<Double>
public void visitDiagonal(int aRow,
int aCol,
AggregatorFunction<Double> aVisitor)
visitDiagonal in interface MatrixStore<Double>
public void visitRow(int aRow,
int aCol,
AggregatorFunction<Double> aVisitor)
visitRow in interface MatrixStore<Double>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||