RationalMatrix
instead.@Deprecated public final class BigMatrix extends Object
BasicMatrix.Builder<I extends BasicMatrix>, BasicMatrix.Factory<I extends BasicMatrix>
Access2D.Aggregatable<N extends Number>, Access2D.Collectable<N extends Number,R extends Mutate2D.Receiver<N>>, Access2D.Elements, Access2D.ElementView<N extends Number>, Access2D.IndexOf, Access2D.Sliceable<N extends Number>, Access2D.Visitable<N extends Number>
Structure2D.IntRowColumn, Structure2D.LongRowColumn, Structure2D.ReducibleTo1D<R extends Structure1D>, Structure2D.RowColumnCallback, Structure2D.RowColumnKey<R,C>, Structure2D.RowColumnMapper<R,C>
Structure1D.BasicMapper<T>, Structure1D.IndexCallback, Structure1D.IndexMapper<T>, Structure1D.IntIndex, Structure1D.LongIndex, Structure1D.LoopCallback
Group.Additive<S>, Group.Multiplicative<S>
Operation.Addition<T>, Operation.Division<T>, Operation.Multiplication<T>, Operation.Subtraction<T>
ScalarOperation.Addition<T,N extends Number>, ScalarOperation.Division<T,N extends Number>, ScalarOperation.Multiplication<T,N extends Number>, ScalarOperation.Subtraction<T,N extends Number>
Modifier and Type | Field and Description |
---|---|
static BasicMatrix.Factory<BigMatrix> |
FACTORY
Deprecated.
v45 Use
RationalMatrix.FACTORY instead. |
Modifier and Type | Method and Description |
---|---|
I |
add(BasicMatrix addend) |
I |
add(double scalarAddend) |
I |
add(int row,
int col,
Access2D<?> addend) |
I |
add(Number scalarAddend) |
N |
aggregateColumn(long row,
long col,
Aggregator aggregator) |
N |
aggregateDiagonal(long row,
long col,
Aggregator aggregator) |
N |
aggregateRange(long first,
long limit,
Aggregator aggregator) |
N |
aggregateRow(long row,
long col,
Aggregator aggregator) |
I |
conjugate()
This method will (most likely) be moved to some other interface in the future! Just have to figure
out where it fits...
|
BasicMatrix.Builder<I> |
copy() |
long |
count()
count() == countRows() * countColumns()
|
long |
countColumns() |
long |
countRows() |
I |
divide(double scalarDivisor) |
I |
divide(Number scalarDivisor) |
I |
divideElements(Access2D<?> divisor)
Divides the elements of this with the elements of aMtrx.
|
double |
doubleValue(long index) |
double |
doubleValue(long i,
long j)
Extracts one element of this matrix as a double.
|
I |
enforce(NumberContext context)
Will enforce this number context on the elements
|
boolean |
equals(Access2D<?> aMtrx,
NumberContext aCntxt) |
boolean |
equals(Object obj) |
void |
flushCache()
BasicMatrix instances are intended to be immutable.
|
N |
get(long index) |
N |
get(long aRow,
long aColumn) |
I |
getColumnsRange(int first,
int limit) |
Scalar<N> |
getCondition()
Matrix condition (2-norm)
|
Scalar<N> |
getDeterminant() |
List<ComplexNumber> |
getEigenvalues() |
Scalar<N> |
getFrobeniusNorm() |
Scalar<N> |
getInfinityNorm() |
Scalar<N> |
getKyFanNorm(int k) |
Scalar<N> |
getOneNorm() |
Scalar<N> |
getOperatorNorm()
Deprecated.
v40 Use
SingularValue |
int |
getRank()
The rank of a matrix is the (maximum) number of linearly independent rows or columns it contains.
|
I |
getRowsRange(int first,
int limit) |
List<Double> |
getSingularValues() |
Scalar<N> |
getTrace()
The sum of the diagonal elements.
|
Scalar<N> |
getTraceNorm() |
Scalar<N> |
getVectorNorm(int degree)
Deprecated.
|
int |
hashCode() |
I |
invert()
About inverting matrices:
|
boolean |
isAbsolute(long row,
long col) |
boolean |
isFullRank() |
boolean |
isHermitian() |
boolean |
isSmall(double comparedTo) |
boolean |
isSmall(long row,
long col,
double comparedTo) |
boolean |
isSymmetric() |
I |
mergeColumns(Access2D<?> belowRows)
[belowRows] is appended below [this].
|
I |
mergeRows(Access2D<?> rightColumns)
[rightColumns] is appended to the right of [this].
|
I |
modify(UnaryFunction<? extends Number> modifier) |
I |
multiply(BasicMatrix multiplicand) |
I |
multiply(double scalarMultiplicand) |
I |
multiply(Number scalarMultiplicand) |
I |
multiplyElements(Access2D<?> multiplicand)
Multiplies the elements of this matrix with the elements of aMtrx.
|
I |
negate()
The additive inverse of this.
|
double |
norm()
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.
|
I |
reduceColumns(Aggregator aggregator) |
I |
reduceRows(Aggregator aggregator) |
I |
selectColumns(int... someCols) |
I |
selectRows(int... someRows) |
I |
signum()
this == this.signum().multiply(this.norm()) |
I |
solve(Access2D<?> rhs)
This method solves a system of linear equations: [this][X]=[aRHS].
|
I |
subtract(BasicMatrix subtrahend) |
BasicMatrix |
subtract(double scalarSubtrahend) |
I |
subtract(Number scalarSubtrahend) |
Scalar<N> |
toScalar(long row,
long col)
Extracts one element of this matrix as a Scalar.
|
String |
toString() |
I |
transpose()
Transposes this matrix.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
calculateFrobeniusNorm, calculateInfinityNorm, calculateOneNorm, toString
asCollectable2D, asPrimitive2D, columns, elements, equals, newPrimitiveColumnCollectable, newPrimitiveRowCollectable, rows, toRawCopy2D, toString, wrap, wrap, wrapAccess2D, wrapAccess2D
asCollectable1D, asPrimitive1D, axpy, dot, equals, hashCode, iterator, nonzeros, stream, supplyTo, toRawCopy1D, wrap, wrap, wrap, wrapAccess1D, wrapAccess1D, wrapAccess1D
forEach, spliterator
isAbsolute, isColumnSmall, isColumnSmall, isRowSmall, isRowSmall, isSmall
isAllSmall
aggregateColumn, aggregateRow, reduceColumns, reduceRows
aggregateAll
column, column, column, column, column, index, index, isEmpty, isFat, isScalar, isSquare, isTall, isVector, loopAll, loopColumn, loopColumn, loopDiagonal, loopMatching, loopRow, loopRow, mapperOf, row, row, row, row, row
loopAll, loopMatching, loopRange, mapper
@Deprecated public static final BasicMatrix.Factory<BigMatrix> FACTORY
RationalMatrix.FACTORY
instead.public I add(BasicMatrix addend)
add
in interface Operation.Addition<BasicMatrix>
addend
- What to addthis + addend
public I add(double scalarAddend)
add
in interface ScalarOperation.Addition<BasicMatrix,Number>
this + scalarAddend
.public I add(int row, int col, Access2D<?> addend)
add
in interface BasicMatrix
row
- The row index of where to superimpose the top left element of the addendcol
- The column index of where to superimpose the top left element of the addendaddend
- A matrix to superimposepublic I add(Number scalarAddend)
add
in interface ScalarOperation.Addition<BasicMatrix,Number>
this + scalarAddend
.public N aggregateColumn(long row, long col, Aggregator aggregator)
aggregateColumn
in interface Access2D.Aggregatable<Number>
public N aggregateDiagonal(long row, long col, Aggregator aggregator)
aggregateDiagonal
in interface Access2D.Aggregatable<Number>
public N aggregateRange(long first, long limit, Aggregator aggregator)
aggregateRange
in interface Access1D.Aggregatable<Number>
public N aggregateRow(long row, long col, Aggregator aggregator)
aggregateRow
in interface Access2D.Aggregatable<Number>
public I conjugate()
VectorSpace
This method will (most likely) be moved to some other interface in the future! Just have to figure out where it fits...
The conjugate transpose of a matrix and/or the conjugate of a scalar/field like ComplexNumber or Quaternion.
The conjugate transpose of a real matrix is simply its transpose.
conjugate
in interface VectorSpace<BasicMatrix,Number>
public BasicMatrix.Builder<I> copy()
copy
in interface BasicMatrix
public long count()
Structure2D
count
in interface Structure1D
count
in interface Structure2D
public long countColumns()
countColumns
in interface Structure2D
public long countRows()
countRows
in interface Structure2D
public I divide(double scalarDivisor)
divide
in interface ScalarOperation.Division<BasicMatrix,Number>
this / scalarDivisor
.public I divide(Number scalarDivisor)
divide
in interface ScalarOperation.Division<BasicMatrix,Number>
this / scalarDivisor
.public I divideElements(Access2D<?> divisor)
BasicMatrix
divideElements
in interface BasicMatrix
divisor
- The denominator elements.public double doubleValue(long index)
doubleValue
in interface Access1D<Number>
doubleValue
in interface Access2D<Number>
public double doubleValue(long i, long j)
Access2D
doubleValue
in interface Access2D<Number>
i
- A row index.j
- A column index.public I enforce(NumberContext context)
BasicMatrix
enforce
in interface BasicMatrix
context
- The contextpublic boolean equals(Access2D<?> aMtrx, NumberContext aCntxt)
equals
in interface BasicMatrix
public void flushCache()
BasicMatrix
flushCache
in interface BasicMatrix
public N get(long index)
public I getColumnsRange(int first, int limit)
getColumnsRange
in interface BasicMatrix
first
- The first column to include.limit
- The limit (exclusive) - the first column not to include.public Scalar<N> getCondition()
BasicMatrix
getCondition
in interface BasicMatrix
public Scalar<N> getDeterminant()
getDeterminant
in interface BasicMatrix
public List<ComplexNumber> getEigenvalues()
getEigenvalues
in interface BasicMatrix
public Scalar<N> getFrobeniusNorm()
public Scalar<N> getInfinityNorm()
public Scalar<N> getKyFanNorm(int k)
public Scalar<N> getOneNorm()
@Deprecated public Scalar<N> getOperatorNorm()
SingularValue
public int getRank()
BasicMatrix
getRank
in interface BasicMatrix
public I getRowsRange(int first, int limit)
getRowsRange
in interface BasicMatrix
first
- The first row to include.limit
- The limit (exclusive) - the first row not to include.public List<Double> getSingularValues()
getSingularValues
in interface BasicMatrix
public Scalar<N> getTrace()
BasicMatrix
getTrace
in interface BasicMatrix
public Scalar<N> getTraceNorm()
@Deprecated public Scalar<N> getVectorNorm(int degree)
Access1D.Aggregatable.aggregateAll(org.ojalgo.function.aggregator.Aggregator)
public I invert()
BasicMatrix
About inverting matrices:
invert
in interface BasicMatrix
public boolean isAbsolute(long row, long col)
isAbsolute
in interface Access2D.Elements
Scalar.isAbsolute()
public boolean isFullRank()
isFullRank
in interface BasicMatrix
public boolean isHermitian()
isHermitian
in interface BasicMatrix
public boolean isSmall(double comparedTo)
isSmall
in interface NormedVectorSpace<BasicMatrix,Number>
comparedTo
- What to compare withpublic boolean isSmall(long row, long col, double comparedTo)
isSmall
in interface Access2D.Elements
NormedVectorSpace.isSmall(double)
public boolean isSymmetric()
isSymmetric
in interface BasicMatrix
public I mergeColumns(Access2D<?> belowRows)
BasicMatrix
mergeColumns
in interface BasicMatrix
belowRows
- The matrix to merge.public I mergeRows(Access2D<?> rightColumns)
BasicMatrix
mergeRows
in interface BasicMatrix
rightColumns
- The matrix to merge.public I modify(UnaryFunction<? extends Number> modifier)
modify
in interface BasicMatrix
public I multiply(BasicMatrix multiplicand)
multiply
in interface Operation.Multiplication<BasicMatrix>
multiplicand
- The multiplicandthis * multiplicand
.public I multiply(double scalarMultiplicand)
multiply
in interface ScalarOperation.Multiplication<BasicMatrix,Number>
this * scalarMultiplicand
.public I multiply(Number scalarMultiplicand)
multiply
in interface ScalarOperation.Multiplication<BasicMatrix,Number>
this * multiplicand
.public I multiplyElements(Access2D<?> multiplicand)
BasicMatrix
multiplyElements
in interface BasicMatrix
multiplicand
- The elements to multiply by.public I negate()
Group.Additive
negate
in interface Group.Additive<BasicMatrix>
-this
.public double norm()
norm
in interface NormedVectorSpace<BasicMatrix,Number>
public I reduceColumns(Aggregator aggregator)
reduceColumns
in interface Structure2D.ReducibleTo1D<BasicMatrix>
public I reduceRows(Aggregator aggregator)
reduceRows
in interface Structure2D.ReducibleTo1D<BasicMatrix>
public I selectColumns(int... someCols)
selectColumns
in interface BasicMatrix
someCols
- An ordered array of column indeces.public I selectRows(int... someRows)
selectRows
in interface BasicMatrix
someRows
- An ordered array of row indeces.public I signum()
NormedVectorSpace
this == this.signum().multiply(this.norm())
signum
in interface NormedVectorSpace<BasicMatrix,Number>
public I solve(Access2D<?> rhs)
BasicMatrix
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
solve
in interface BasicMatrix
rhs
- The right hand side of the equation.public I subtract(BasicMatrix subtrahend)
subtract
in interface Operation.Subtraction<BasicMatrix>
subtrahend
- The subtrahendthis - subtrahend
.public BasicMatrix subtract(double scalarSubtrahend)
subtract
in interface ScalarOperation.Subtraction<BasicMatrix,Number>
this - scalarSubtrahend
.public I subtract(Number scalarSubtrahend)
subtract
in interface ScalarOperation.Subtraction<BasicMatrix,Number>
this - scalarSubtrahend
.public Scalar<N> toScalar(long row, long col)
BasicMatrix
toScalar
in interface BasicMatrix
row
- A row index.col
- A column index.public I transpose()
BasicMatrix
transpose
in interface BasicMatrix
VectorSpace.conjugate()
Copyright © 2018 Optimatika. All rights reserved.