public final class JamaMatrix extends Object implements BasicMatrix<Double>, PhysicalStore<Double>, Serializable
BasicMatrix.Factory<I extends BasicMatrix<?>>PhysicalStore.Factory<N extends Number,I extends PhysicalStore<N>>MatrixStore.Builder<N extends Number>Access2D.Elements, Access2D.Fillable<N extends Number>, Access2D.Iterable2D<N extends Number>, Access2D.Modifiable<N extends Number>, Access2D.Visitable<N extends Number>| Modifier and Type | Field and Description |
|---|---|
static JamaFactory |
FACTORY |
| Constructor and Description |
|---|
JamaMatrix(BasicMatrix aMtrx) |
JamaMatrix(MatrixStore<Double> aStore) |
| Modifier and Type | Method and Description |
|---|---|
JamaMatrix |
add(Access2D<?> aMtrx)
Adds the elements of aMtrx to the elements of this matrix.
|
JamaMatrix |
add(int row,
int column,
Access2D<?> aMtrx) |
JamaMatrix |
add(int row,
int column,
Number aNmbr)
Do not use this method to populate large dense matrices!
Only use it to change a few (a small number) of elements.
|
MatrixStore<Double> |
add(MatrixStore<Double> addend) |
JamaMatrix |
add(Number aNmbr)
Adds aNmbr to the elements of this.
|
Double |
aggregateAll(Aggregator aggregator) |
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.
|
JamaMatrix |
copy()
Each call must produce a new instance.
|
Access2D.Builder<JamaMatrix> |
copyToBuilder() |
long |
count() |
long |
countColumns() |
long |
countRows() |
JamaMatrix |
divide(Number aNmbr)
Divides the elements of this with aNmbr.
|
JamaMatrix |
divideElements(Access2D<?> aMtrx)
Divides the elements of this with the elements of aMtrx.
|
double |
doubleValue(long anInd) |
double |
doubleValue(long row,
long column)
Extracts one element of this matrix as a double.
|
JamaMatrix |
enforce(NumberContext aContext) |
boolean |
equals(Access2D<?> aMtrx,
NumberContext aCntxt) |
boolean |
equals(MatrixStore<Double> other,
NumberContext context) |
boolean |
equals(Object anObject) |
void |
exchangeColumns(int aColA,
int aColB) |
void |
exchangeRows(int aRowA,
int aRowB) |
PhysicalStore.Factory<Double,JamaMatrix> |
factory() |
void |
fillAll(Double aNmbr) |
void |
fillByMultiplying(Access1D<Double> aLeftArg,
Access1D<Double> aRightArg) |
void |
fillColumn(long row,
long column,
Double aNmbr) |
void |
fillConjugated(Access2D<? extends Number> source) |
void |
fillDiagonal(long row,
long column,
Double aNmbr) |
void |
fillMatching(Access1D<? extends Number> source) |
void |
fillMatching(Access1D<Double> leftArg,
BinaryFunction<Double> function,
Access1D<Double> rightArg)
Will replace the elements of [this] with the results of element wise invocation of the input binary funtion:
|
void |
fillMatching(Access1D<Double> aLeftArg,
BinaryFunction<Double> function,
Double aRightArg)
Will replace the elements of [this] with the results of element wise invocation of the input binary funtion:
|
void |
fillMatching(Double aLeftArg,
BinaryFunction<Double> function,
Access1D<Double> aRightArg)
Will replace the elements of [this] with the results of element wise invocation of the input binary funtion:
|
void |
fillRange(long first,
long limit,
Double value) |
void |
fillRow(long row,
long column,
Double aNmbr) |
void |
fillTransposed(Access2D<? extends Number> source) |
void |
flushCache()
BasicMatrix instances are intended to be immutable.
|
Double |
get(long index) |
Double |
get(long row,
long column) |
static Access2D.Builder<JamaMatrix> |
getBuilder(int aLength) |
static Access2D.Builder<JamaMatrix> |
getBuilder(int aRowDim,
int aColDim) |
int |
getColDim() |
JamaMatrix |
getColumnsRange(int aFirst,
int aLimit) |
PrimitiveScalar |
getCondition() |
PrimitiveScalar |
getDeterminant() |
List<ComplexNumber> |
getEigenvalues() |
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.
|
PrimitiveScalar |
getInfinityNorm() |
PrimitiveScalar |
getKyFanNorm(int k) |
int |
getMaxDim() |
int |
getMinDim() |
Scalar<Double> |
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 |
getRowsRange(int aFirst,
int aLimit) |
List<Double> |
getSingularValues() |
PrimitiveScalar |
getTrace()
The sum of the diagonal elements.
|
PrimitiveScalar |
getTraceNorm() |
PrimitiveScalar |
getVectorNorm(int aDegree)
Treats [this] as if it is one dimensional (a vector) and
calculates the vector norm.
|
int |
hashCode() |
JamaMatrix |
invert()
About inverting matrices:
|
boolean |
isAbsolute(long index) |
boolean |
isAbsolute(long row,
long column) |
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 |
isInfinite(long index) |
boolean |
isInfinite(long row,
long column) |
boolean |
isLowerLeftShaded()
The entries below (left of) the first subdiagonal are zero - effectively an upper Hessenberg matrix.
|
boolean |
isNaN(long index) |
boolean |
isNaN(long row,
long column) |
boolean |
isPositive(long index) |
boolean |
isPositive(long row,
long column) |
boolean |
isReal(long index) |
boolean |
isReal(long row,
long column) |
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 |
isUpperRightShaded()
The entries above (right of) the first superdiagonal are zero - effectively a lower Hessenberg matrix.
|
boolean |
isVector() |
boolean |
isZero(long index) |
boolean |
isZero(long row,
long column) |
Iterator<Double> |
iterator() |
void |
maxpy(Double aSclrA,
MatrixStore<Double> aMtrxX)
matrix a * x plus y
|
JamaMatrix |
mergeColumns(Access2D<?> aMtrx)
[aMtrx] is appended to the bottom of [this].
|
JamaMatrix |
mergeRows(Access2D<?> aMtrx)
[aMtrx] is appended to the right side of [this].
|
JamaMatrix |
modify(UnaryFunction<Double> function) |
void |
modifyAll(UnaryFunction<Double> function) |
void |
modifyColumn(long row,
long column,
UnaryFunction<Double> function) |
void |
modifyDiagonal(long row,
long column,
UnaryFunction<Double> function) |
void |
modifyOne(long row,
long column,
UnaryFunction<Double> function) |
void |
modifyRange(long first,
long limit,
UnaryFunction<Double> function) |
void |
modifyRow(long row,
long column,
UnaryFunction<Double> function) |
JamaMatrix |
multiply(Number aNmbr)
Multiplies the elements of this matrix with aNmbr.
|
JamaMatrix |
multiplyElements(Access2D<?> aMtrx)
Multiplies the elements of this matrix with the elements of aMtrx.
|
JamaMatrix |
multiplyLeft(Access1D<Double> leftMtrx) |
JamaMatrix |
multiplyLeft(Access2D<?> aMtrx)
Matrix multiplication: [aMtrx][this]
The column dimension of the left matrix must equal the row dimension of the right matrix. |
JamaMatrix |
multiplyRight(Access1D<Double> rightMtrx) |
JamaMatrix |
multiplyRight(Access2D<?> aMtrx)
Matrix multiplication: [this][aMtrx]
The column dimension of the left matrix must equal the row dimension of the right matrix. |
PrimitiveScalar |
multiplyVectors(Access2D<?> 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) |
JamaMatrix |
scale(Double scalar) |
JamaMatrix |
selectColumns(int... someCols) |
JamaMatrix |
selectRows(int... someRows) |
Double |
set(int anInd,
Number value) |
void |
set(long index,
double value) |
void |
set(long row,
long column,
double aNmbr) |
void |
set(long row,
long column,
Number aNmbr) |
void |
set(long index,
Number value) |
int |
size() |
JamaMatrix |
solve(Access2D<?> aRHS)
This method solves a system of linear equations: [this][X]=[aRHS].
|
JamaMatrix |
subtract(Access2D<?> aMtrx)
Subtracts the elements of aMtrx from the elements of this matrix.
|
MatrixStore<Double> |
subtract(MatrixStore<Double> subtrahend) |
JamaMatrix |
subtract(Number value)
Subtracts aNmbr from the elements of this matrix.
|
BigDecimal |
toBigDecimal(int row,
int column)
Extracts one element of this matrix as a BigDecimal.
|
PhysicalStore<BigDecimal> |
toBigStore()
Must be a copy that is safe to modify.
|
ComplexNumber |
toComplexNumber(int row,
int column)
Extracts one element of this matrix as a ComplexNumber.
|
PhysicalStore<ComplexNumber> |
toComplexStore()
Must be a copy that is safe to modify.
|
List<BasicMatrix<Double>> |
toListOfColumns() |
List<Double> |
toListOfElements()
It is also possible to call BasicMatrix.toBigStore(), BasicMatrix.toComplexStore()
or BasicMatrix.toPrimitiveStore() and then PhysicalStore.asList().
|
List<BasicMatrix<Double>> |
toListOfRows() |
JamaMatrix |
toPrimitiveStore()
Must be a copy that is safe to modify.
|
PrimitiveScalar |
toScalar(long row,
long column)
Extracts one element of this matrix as a Scalar.
|
String |
toString() |
String |
toString(int row,
int column) |
void |
transformLeft(Householder<Double> transformation,
int firstColumn) |
void |
transformLeft(Rotation<Double> transformation)
As in
MatrixStore#multiplyLeft(MatrixStore) where the left/parameter matrix is a plane rotation. |
void |
transformRight(Householder<Double> transformation,
int firstRow) |
void |
transformRight(Rotation<Double> transformation)
As in
MatrixStore#multiplyRight(MatrixStore) where the right/parameter matrix is a plane rotation. |
JamaMatrix |
transpose()
Transposes this matrix.
|
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 row,
int column,
Number aNmbr) |
void |
visitAll(VoidFunction<Double> visitor) |
void |
visitColumn(long row,
long column,
VoidFunction<Double> visitor) |
void |
visitDiagonal(long row,
long column,
VoidFunction<Double> visitor) |
void |
visitRange(long first,
long limit,
VoidFunction<Double> visitor) |
void |
visitRow(long row,
long column,
VoidFunction<Double> visitor) |
forEach, spliteratorpublic static final JamaFactory FACTORY
public JamaMatrix(BasicMatrix aMtrx)
public JamaMatrix(MatrixStore<Double> aStore)
public static Access2D.Builder<JamaMatrix> getBuilder(int aLength)
public static Access2D.Builder<JamaMatrix> getBuilder(int aRowDim, int aColDim)
public JamaMatrix add(Access2D<?> aMtrx)
BasicMatrixadd in interface BasicMatrix<Double>aMtrx - What to add.public JamaMatrix add(int row, int column, Access2D<?> aMtrx)
add in interface BasicMatrix<Double>row - The row index of where to superimpose the top left element of aMtrxcolumn - The column index of where to superimpose the top left element of aMtrxaMtrx - A matrix to superimposepublic JamaMatrix add(int row, int column, Number aNmbr)
BasicMatrixadd in interface BasicMatrix<Double>public MatrixStore<Double> add(MatrixStore<Double> addend)
add in interface MatrixStore<Double>public JamaMatrix add(Number aNmbr)
BasicMatrixadd in interface BasicMatrix<Double>aNmbr - What to addpublic Double aggregateAll(Aggregator aggregator)
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()
BasicMatrixconjugate in interface BasicMatrix<Double>conjugate in interface MatrixStore<Double>BasicMatrix.transpose()public JamaMatrix copy()
MatrixStorecopy in interface MatrixStore<Double>public Access2D.Builder<JamaMatrix> copyToBuilder()
copyToBuilder in interface BasicMatrix<Double>public long count()
public long countColumns()
public long countRows()
public JamaMatrix divide(Number aNmbr)
BasicMatrixdivide in interface BasicMatrix<Double>aNmbr - The denominator.public JamaMatrix divideElements(Access2D<?> aMtrx)
BasicMatrixdivideElements in interface BasicMatrix<Double>aMtrx - The denominator elements.public double doubleValue(long anInd)
doubleValue in interface Access1D<Double>public double doubleValue(long row,
long column)
Access2DdoubleValue in interface Access2D<Double>row - A row index.column - A column index.public JamaMatrix enforce(NumberContext aContext)
enforce in interface BasicMatrix<Double>public final boolean equals(Access2D<?> aMtrx, NumberContext aCntxt)
equals in interface BasicMatrix<Double>public boolean equals(MatrixStore<Double> other, NumberContext context)
equals in interface MatrixStore<Double>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 PhysicalStore.Factory<Double,JamaMatrix> factory()
factory in interface MatrixStore<Double>public void fillAll(Double aNmbr)
fillAll in interface Access1D.Fillable<Double>public void fillByMultiplying(Access1D<Double> aLeftArg, Access1D<Double> aRightArg)
fillByMultiplying in interface PhysicalStore<Double>public void fillColumn(long row,
long column,
Double aNmbr)
fillColumn in interface Access2D.Fillable<Double>public void fillConjugated(Access2D<? extends Number> source)
fillConjugated in interface PhysicalStore<Double>public void fillDiagonal(long row,
long column,
Double aNmbr)
fillDiagonal in interface Access2D.Fillable<Double>public void fillMatching(Access1D<? extends Number> source)
fillMatching in interface PhysicalStore<Double>public void fillMatching(Access1D<Double> leftArg, BinaryFunction<Double> function, Access1D<Double> rightArg)
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 fillMatching(Access1D<Double> aLeftArg, BinaryFunction<Double> function, 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(Double aLeftArg, BinaryFunction<Double> function, Access1D<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 fillRange(long first,
long limit,
Double value)
fillRange in interface Access1D.Fillable<Double>public void fillRow(long row,
long column,
Double aNmbr)
fillRow in interface Access2D.Fillable<Double>public void fillTransposed(Access2D<? extends Number> source)
fillTransposed in interface PhysicalStore<Double>public void flushCache()
BasicMatrixflushCache in interface BasicMatrix<Double>public int getColDim()
public JamaMatrix getColumnsRange(int aFirst, int aLimit)
getColumnsRange in interface BasicMatrix<Double>aFirst - The first column to include.aLimit - The limit (exclusive) - the first column not to include.public PrimitiveScalar getCondition()
getCondition in interface BasicMatrix<Double>public PrimitiveScalar getDeterminant()
getDeterminant in interface BasicMatrix<Double>public List<ComplexNumber> getEigenvalues()
getEigenvalues in interface BasicMatrix<Double>public PrimitiveScalar getFrobeniusNorm()
BasicMatrixgetFrobeniusNorm in interface BasicMatrix<Double>BasicMatrix.getFrobeniusNorm(),
BasicMatrix.getInfinityNorm(),
BasicMatrix.getKyFanNorm(int),
BasicMatrix.getOneNorm(),
BasicMatrix.getOperatorNorm(),
BasicMatrix.getTraceNorm(),
BasicMatrix.getVectorNorm(int)public PrimitiveScalar getInfinityNorm()
getInfinityNorm in interface BasicMatrix<Double>BasicMatrix.getFrobeniusNorm(),
BasicMatrix.getInfinityNorm(),
BasicMatrix.getKyFanNorm(int),
BasicMatrix.getOneNorm(),
BasicMatrix.getOperatorNorm(),
BasicMatrix.getTraceNorm(),
BasicMatrix.getVectorNorm(int)public PrimitiveScalar getKyFanNorm(int k)
public int getMaxDim()
public int getMinDim()
public Scalar<Double> getOneNorm()
getOneNorm in interface BasicMatrix<Double>BasicMatrix.getFrobeniusNorm(),
BasicMatrix.getInfinityNorm(),
BasicMatrix.getKyFanNorm(int),
BasicMatrix.getOneNorm(),
BasicMatrix.getOperatorNorm(),
BasicMatrix.getTraceNorm(),
BasicMatrix.getVectorNorm(int)public PrimitiveScalar getOperatorNorm()
BasicMatrixpublic int getRank()
BasicMatrixgetRank in interface BasicMatrix<Double>public int getRowDim()
public JamaMatrix getRowsRange(int aFirst, int aLimit)
getRowsRange in interface BasicMatrix<Double>aFirst - The first row to include.aLimit - The limit (exclusive) - the first row not to include.public List<Double> getSingularValues()
getSingularValues in interface BasicMatrix<Double>public PrimitiveScalar getTrace()
BasicMatrixgetTrace in interface BasicMatrix<Double>public PrimitiveScalar getTraceNorm()
public PrimitiveScalar getVectorNorm(int aDegree)
BasicMatrixpublic JamaMatrix invert()
BasicMatrixAbout inverting matrices:
invert in interface BasicMatrix<Double>public boolean isAbsolute(long index)
isAbsolute in interface Access1D.ElementsScalar.isAbsolute()public boolean isAbsolute(long row,
long column)
isAbsolute in interface Access2D.ElementsScalar.isAbsolute()public boolean isEmpty()
BasicMatrixisEmpty in interface BasicMatrix<Double>public boolean isFat()
BasicMatrixisFat in interface BasicMatrix<Double>public boolean isFullRank()
isFullRank in interface BasicMatrix<Double>public boolean isHermitian()
isHermitian in interface BasicMatrix<Double>public boolean isInfinite(long index)
isInfinite in interface Access1D.ElementsScalar.isInfinite()public boolean isInfinite(long row,
long column)
isInfinite in interface Access2D.ElementsScalar.isInfinite()public boolean isLowerLeftShaded()
MatrixStoreisLowerLeftShaded in interface MatrixStore<Double>MatrixStore.isUpperRightShaded()public boolean isNaN(long index)
isNaN in interface Access1D.ElementsScalar.isNaN()public boolean isNaN(long row,
long column)
isNaN in interface Access2D.ElementsScalar.isNaN()public boolean isPositive(long index)
isPositive in interface Access1D.ElementsScalar.isPositive()public boolean isPositive(long row,
long column)
isPositive in interface Access2D.ElementsScalar.isPositive()public boolean isReal(long index)
isReal in interface Access1D.ElementsScalar.isReal()public boolean isReal(long row,
long column)
isReal in interface Access2D.ElementsScalar.isReal()public boolean isScalar()
isScalar in interface BasicMatrix<Double>public boolean isSquare()
BasicMatrixisSquare in interface BasicMatrix<Double>public boolean isSymmetric()
isSymmetric in interface BasicMatrix<Double>public boolean isTall()
BasicMatrixisTall in interface BasicMatrix<Double>public boolean isUpperRightShaded()
MatrixStoreisUpperRightShaded in interface MatrixStore<Double>MatrixStore.isLowerLeftShaded()public boolean isVector()
isVector in interface BasicMatrix<Double>public boolean isZero(long index)
isZero in interface Access1D.ElementsScalar.isZero()public boolean isZero(long row,
long column)
isZero in interface Access2D.ElementsScalar.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(Access2D<?> aMtrx)
BasicMatrixmergeColumns in interface BasicMatrix<Double>aMtrx - The matrix to merge.public JamaMatrix mergeRows(Access2D<?> aMtrx)
BasicMatrixmergeRows in interface BasicMatrix<Double>aMtrx - The matrix to merge.public JamaMatrix modify(UnaryFunction<Double> function)
modify in interface BasicMatrix<Double>public void modifyAll(UnaryFunction<Double> function)
modifyAll in interface Access1D.Modifiable<Double>public void modifyColumn(long row,
long column,
UnaryFunction<Double> function)
modifyColumn in interface Access2D.Modifiable<Double>public void modifyDiagonal(long row,
long column,
UnaryFunction<Double> function)
modifyDiagonal in interface Access2D.Modifiable<Double>public void modifyOne(long row,
long column,
UnaryFunction<Double> function)
modifyOne in interface PhysicalStore<Double>public void modifyRange(long first,
long limit,
UnaryFunction<Double> function)
modifyRange in interface Access1D.Modifiable<Double>public void modifyRow(long row,
long column,
UnaryFunction<Double> function)
modifyRow in interface Access2D.Modifiable<Double>public JamaMatrix multiply(Number aNmbr)
BasicMatrixmultiply in interface BasicMatrix<Double>aNmbr - What to multiply with.public JamaMatrix multiplyElements(Access2D<?> aMtrx)
BasicMatrixmultiplyElements in interface BasicMatrix<Double>aMtrx - The elements to multiply by.public JamaMatrix multiplyLeft(Access1D<Double> leftMtrx)
multiplyLeft in interface MatrixStore<Double>public JamaMatrix multiplyLeft(Access2D<?> aMtrx)
BasicMatrixmultiplyLeft in interface BasicMatrix<Double>aMtrx - The left matrix.org.ojalgo.matrix.BasicMatrix#multiplyRight(BasicMatrix)public JamaMatrix multiplyRight(Access1D<Double> rightMtrx)
multiplyRight in interface MatrixStore<Double>public JamaMatrix multiplyRight(Access2D<?> aMtrx)
BasicMatrixmultiplyRight in interface BasicMatrix<Double>aMtrx - The right matrix.org.ojalgo.matrix.BasicMatrix#multiplyLeft(BasicMatrix)public PrimitiveScalar multiplyVectors(Access2D<?> aVctr)
BasicMatrixmultiplyVectors in interface BasicMatrix<Double>public JamaMatrix negate()
negate in interface BasicMatrix<Double>negate in interface MatrixStore<Double>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<Double>public JamaMatrix scale(Double scalar)
scale in interface MatrixStore<Double>public JamaMatrix selectColumns(int... someCols)
selectColumns in interface BasicMatrix<Double>someCols - An ordered array of column indeces.public JamaMatrix selectRows(int... someRows)
selectRows in interface BasicMatrix<Double>someRows - An ordered array of row indeces.public void set(long index,
double value)
set in interface Access1D.Fillable<Double>public void set(long row,
long column,
double aNmbr)
set in interface Access2D.Fillable<Double>public void set(long row,
long column,
Number aNmbr)
set in interface Access2D.Fillable<Double>public void set(long index,
Number value)
set in interface Access1D.Fillable<Double>public int size()
public JamaMatrix solve(Access2D<?> 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 BasicMatrix<Double>aRHS - The right hand side of the equation.public JamaMatrix subtract(Access2D<?> aMtrx)
BasicMatrixsubtract in interface BasicMatrix<Double>aMtrx - What to subtract.public MatrixStore<Double> subtract(MatrixStore<Double> subtrahend)
subtract in interface MatrixStore<Double>public JamaMatrix subtract(Number value)
BasicMatrixsubtract in interface BasicMatrix<Double>value - What to subtract.public BigDecimal toBigDecimal(int row, int column)
BasicMatrixtoBigDecimal in interface BasicMatrix<Double>row - A row index.column - A column index.public PhysicalStore<BigDecimal> toBigStore()
BasicMatrixtoBigStore in interface BasicMatrix<Double>BasicMatrix.toComplexStore(),
BasicMatrix.toPrimitiveStore()public ComplexNumber toComplexNumber(int row, int column)
BasicMatrixtoComplexNumber in interface BasicMatrix<Double>row - A row index.column - A column index.public PhysicalStore<ComplexNumber> toComplexStore()
BasicMatrixtoComplexStore in interface BasicMatrix<Double>BasicMatrix.toBigStore(),
BasicMatrix.toPrimitiveStore()public List<BasicMatrix<Double>> toListOfColumns()
toListOfColumns in interface BasicMatrix<Double>public List<Double> toListOfElements()
BasicMatrixtoListOfElements in interface BasicMatrix<Double>public List<BasicMatrix<Double>> toListOfRows()
toListOfRows in interface BasicMatrix<Double>public JamaMatrix toPrimitiveStore()
BasicMatrixtoPrimitiveStore in interface BasicMatrix<Double>BasicMatrix.toBigStore(),
BasicMatrix.toComplexStore()public PrimitiveScalar toScalar(long row, long column)
BasicMatrixtoScalar in interface BasicMatrix<Double>toScalar in interface MatrixStore<Double>row - A row index.column - A column index.public String toString(int row, int column)
toString in interface BasicMatrix<Double>public void transformLeft(Householder<Double> transformation, int firstColumn)
transformLeft in interface PhysicalStore<Double>public void transformLeft(Rotation<Double> transformation)
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> transformation, int firstRow)
transformRight in interface PhysicalStore<Double>public void transformRight(Rotation<Double> transformation)
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()
BasicMatrixtranspose in interface BasicMatrix<Double>transpose in interface MatrixStore<Double>BasicMatrix.conjugate()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 row,
int column,
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(VoidFunction<Double> visitor)
visitAll in interface Access1D.Visitable<Double>public void visitColumn(long row,
long column,
VoidFunction<Double> visitor)
visitColumn in interface Access2D.Visitable<Double>public void visitDiagonal(long row,
long column,
VoidFunction<Double> visitor)
visitDiagonal in interface Access2D.Visitable<Double>public void visitRange(long first,
long limit,
VoidFunction<Double> visitor)
visitRange in interface Access1D.Visitable<Double>public void visitRow(long row,
long column,
VoidFunction<Double> visitor)
visitRow in interface Access2D.Visitable<Double>