Class R064Store
- java.lang.Object
-
- org.ojalgo.array.BasicArray<N>
-
- org.ojalgo.array.DenseArray<N>
-
- org.ojalgo.array.PlainArray<java.lang.Double>
-
- org.ojalgo.array.PrimitiveArray
-
- org.ojalgo.array.ArrayR064
-
- org.ojalgo.matrix.store.R064Store
-
- All Implemented Interfaces:
java.util.function.Consumer<Access2D<?>>
,java.util.RandomAccess
,Group
,Group.Additive<MatrixStore<java.lang.Double>>
,NormedVectorSpace<MatrixStore<java.lang.Double>,java.lang.Double>
,Operation
,Operation.Addition<MatrixStore<java.lang.Double>>
,Operation.Multiplication<MatrixStore<java.lang.Double>>
,Operation.Subtraction<MatrixStore<java.lang.Double>>
,ScalarOperation
,ScalarOperation.Addition<MatrixStore<java.lang.Double>,java.lang.Double>
,ScalarOperation.Division<MatrixStore<java.lang.Double>,java.lang.Double>
,ScalarOperation.Multiplication<MatrixStore<java.lang.Double>,java.lang.Double>
,ScalarOperation.Subtraction<MatrixStore<java.lang.Double>,java.lang.Double>
,VectorSpace<MatrixStore<java.lang.Double>,java.lang.Double>
,DecompositionStore<java.lang.Double>
,ExchangeColumns
,NegateColumn
,RotateRight
,Matrix2D<java.lang.Double,MatrixStore<java.lang.Double>>
,ElementsSupplier<java.lang.Double>
,MatrixStore<java.lang.Double>
,PhysicalStore<java.lang.Double>
,TransformableRegion<java.lang.Double>
,Access1D<java.lang.Double>
,Access1D.Aggregatable<java.lang.Double>
,Access1D.Collectable<java.lang.Double,Mutate1D>
,Access1D.Sliceable<java.lang.Double>
,Access1D.Visitable<java.lang.Double>
,Access2D<java.lang.Double>
,Access2D.Aggregatable<java.lang.Double>
,Access2D.Collectable<java.lang.Double,TransformableRegion<java.lang.Double>>
,Access2D.Sliceable<java.lang.Double>
,Access2D.Visitable<java.lang.Double>
,Factory1D.Builder<DenseArray<java.lang.Double>>
,Factory2D.Builder<R064Store>
,Mutate1D
,Mutate1D.Fillable<java.lang.Double>
,Mutate1D.Modifiable<java.lang.Double>
,Mutate1D.Sortable
,Mutate2D
,Mutate2D.Exchangeable
,Mutate2D.Fillable<java.lang.Double>
,Mutate2D.Modifiable<java.lang.Double>
,Mutate2D.ModifiableReceiver<java.lang.Double>
,Mutate2D.Receiver<java.lang.Double>
,Operate2D<java.lang.Double,ElementsSupplier<java.lang.Double>>
,Structure1D
,Structure2D
,Structure2D.Logical<Access2D<java.lang.Double>,MatrixStore<java.lang.Double>>
,Structure2D.ReducibleTo1D<ElementsSupplier<java.lang.Double>>
public final class R064Store extends ArrayR064 implements PhysicalStore<java.lang.Double>, DecompositionStore<java.lang.Double>, Factory2D.Builder<R064Store>
A double implementation of PhysicalStore.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.ojalgo.array.DenseArray
DenseArray.Factory<N extends java.lang.Comparable<N>>
-
Nested classes/interfaces inherited from interface org.ojalgo.structure.Access1D
Access1D.Aggregatable<N extends java.lang.Comparable<N>>, Access1D.Collectable<N extends java.lang.Comparable<N>,R extends Mutate1D>, Access1D.ElementView<N extends java.lang.Comparable<N>>, Access1D.SelectionView<N extends java.lang.Comparable<N>>, Access1D.Sliceable<N extends java.lang.Comparable<N>>, Access1D.Visitable<N extends java.lang.Comparable<N>>
-
Nested classes/interfaces inherited from interface org.ojalgo.structure.Access2D
Access2D.Aggregatable<N extends java.lang.Comparable<N>>, Access2D.Collectable<N extends java.lang.Comparable<N>,R extends Mutate2D>, Access2D.ColumnView<N extends java.lang.Comparable<N>>, Access2D.ElementView<N extends java.lang.Comparable<N>>, Access2D.RowView<N extends java.lang.Comparable<N>>, Access2D.SelectionView<N extends java.lang.Comparable<N>>, Access2D.Sliceable<N extends java.lang.Comparable<N>>, Access2D.Visitable<N extends java.lang.Comparable<N>>
-
Nested classes/interfaces inherited from interface org.ojalgo.algebra.Group
Group.Additive<T>, Group.Multiplicative<T>
-
Nested classes/interfaces inherited from interface org.ojalgo.structure.Mutate1D
Mutate1D.Fillable<N extends java.lang.Comparable<N>>, Mutate1D.Mixable<N extends java.lang.Comparable<N>>, Mutate1D.Modifiable<N extends java.lang.Comparable<N>>, Mutate1D.ModifiableReceiver<N extends java.lang.Comparable<N>>, Mutate1D.Receiver<N extends java.lang.Comparable<N>>, Mutate1D.Sortable
-
Nested classes/interfaces inherited from interface org.ojalgo.structure.Mutate2D
Mutate2D.Exchangeable, Mutate2D.Fillable<N extends java.lang.Comparable<N>>, Mutate2D.Mixable<N extends java.lang.Comparable<N>>, Mutate2D.Modifiable<N extends java.lang.Comparable<N>>, Mutate2D.ModifiableReceiver<N extends java.lang.Comparable<N>>, Mutate2D.Receiver<N extends java.lang.Comparable<N>>
-
Nested classes/interfaces inherited from interface org.ojalgo.algebra.Operation
Operation.Addition<T>, Operation.Division<T>, Operation.Multiplication<T>, Operation.Subtraction<T>
-
Nested classes/interfaces inherited from interface org.ojalgo.matrix.store.PhysicalStore
PhysicalStore.Factory<N extends java.lang.Comparable<N>,I extends PhysicalStore<N> & Factory2D.Builder<I>>
-
Nested classes/interfaces inherited from interface org.ojalgo.algebra.ScalarOperation
ScalarOperation.Addition<T,N extends java.lang.Comparable<N>>, ScalarOperation.Division<T,N extends java.lang.Comparable<N>>, ScalarOperation.Multiplication<T,N extends java.lang.Comparable<N>>, ScalarOperation.Subtraction<T,N extends java.lang.Comparable<N>>
-
Nested classes/interfaces inherited from interface org.ojalgo.structure.Structure1D
Structure1D.BasicMapper<T>, Structure1D.IndexMapper<T>, Structure1D.IntIndex, Structure1D.Logical<S extends Structure1D,B extends Structure1D.Logical<S,B>>, Structure1D.LongIndex, Structure1D.LoopCallback
-
Nested classes/interfaces inherited from interface org.ojalgo.structure.Structure2D
Structure2D.IntRowColumn, Structure2D.Logical<S extends Structure2D,B extends Structure2D.Logical<S,B>>, Structure2D.LongRowColumn, Structure2D.ReducibleTo1D<R extends Structure1D>, Structure2D.Reshapable, Structure2D.RowColumnKey<R,C>, Structure2D.RowColumnMapper<R,C>
-
Nested classes/interfaces inherited from interface org.ojalgo.matrix.store.TransformableRegion
TransformableRegion.FillByMultiplying<N extends java.lang.Comparable<N>>
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static long
ELEMENT_SIZE
static PhysicalStore.Factory<java.lang.Double,R064Store>
FACTORY
private MultiplyBoth.Primitive
multiplyBoth
private MultiplyLeft.Primitive64
multiplyLeft
private MultiplyNeither.Primitive64
multiplyNeither
private MultiplyRight.Primitive64
multiplyRight
private int
myColDim
private int
myRowDim
private Array2D<java.lang.Double>
myUtility
private double[]
myWorkerColumn
(package private) static long
SHALLOW_SIZE
-
Fields inherited from class org.ojalgo.array.PlainArray
MAX_SIZE
-
Fields inherited from interface org.ojalgo.matrix.decomposition.function.ExchangeColumns
NULL
-
Fields inherited from interface org.ojalgo.matrix.decomposition.function.NegateColumn
NULL
-
Fields inherited from interface org.ojalgo.matrix.decomposition.function.RotateRight
NULL
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(Access2D<?> supplied)
void
add(long row, long col, double addend)
void
add(long row, long col, java.lang.Comparable<?> addend)
void
applyCholesky(int iterationPoint, BasicArray<java.lang.Double> multipliers)
Cholesky transformationsvoid
applyLDL(int iterationPoint, BasicArray<java.lang.Double> multipliers)
LDL transformationsvoid
applyLU(int iterationPoint, BasicArray<java.lang.Double> multipliers)
LU transformationsArray1D<java.lang.Double>
asList()
R064Store
build()
(package private) static Householder.Primitive64
cast(Householder<java.lang.Double> transformation)
(package private) static Rotation.Primitive
cast(Rotation<java.lang.Double> transformation)
(package private) static R064Store
cast(Access1D<?> matrix)
void
caxpy(double aSclrA, int aColX, int aColY, int aFirstRow)
Array1D<ComplexNumber>
computeInPlaceSchur(PhysicalStore<java.lang.Double> transformationCollector, boolean eigenvalue)
MatrixStore<java.lang.Double>
conjugate()
Returns the conjugate transpose of this matrix.R064Store
copy()
Each call must produce a new instance.long
countColumns()
Only need to implement if the structure may contain more than Integer.MAX_VALUE elements.long
countRows()
Only need to implement if the structure may contain more than Integer.MAX_VALUE elements.void
divideAndCopyColumn(int row, int column, BasicArray<java.lang.Double> destination)
double
doubleValue(int row, int col)
Extracts one element of this matrix as a double.boolean
equals(java.lang.Object obj)
void
exchangeColumns(long colA, long colB)
void
exchangeHermitian(int indexA, int indexB)
void
exchangeRows(long rowA, long rowB)
void
fillByMultiplying(Access1D<java.lang.Double> left, Access1D<java.lang.Double> right)
void
fillColumn(long row, long col, java.lang.Double value)
void
fillColumn(long row, long col, NullaryFunction<?> supplier)
void
fillColumn(long row, long col, Access1D<java.lang.Double> values)
void
fillCompatible(Access2D<java.lang.Double> left, BinaryFunction<java.lang.Double> operator, Access2D<java.lang.Double> right)
'this' needs to be of a size compatible with the 'left' and 'right' matrices.void
fillDiagonal(long row, long col, java.lang.Double value)
void
fillDiagonal(long row, long col, NullaryFunction<?> supplier)
void
fillMatching(UnaryFunction<java.lang.Double> function, Access1D<java.lang.Double> arguments)
void
fillMatching(Access1D<?> values)
Will fill the elements of [this] with the corresponding input values, and in the process (if necessary) convert the elements to the correct type:void
fillMatching(Access1D<java.lang.Double> left, BinaryFunction<java.lang.Double> function, Access1D<java.lang.Double> right)
void
fillRow(long row, long col, java.lang.Double value)
void
fillRow(long row, long col, NullaryFunction<?> supplier)
void
fillRow(long row, long col, Access1D<java.lang.Double> values)
boolean
generateApplyAndCopyHouseholderColumn(int row, int column, Householder<java.lang.Double> destination)
boolean
generateApplyAndCopyHouseholderRow(int row, int column, Householder<java.lang.Double> destination)
MatrixStore<java.lang.Double>
get()
java.lang.Double
get(int row, int col)
int
getColDim()
static R064Store
getComplexArgument(Access2D<ComplexNumber> arg)
Extracts the argument of the ComplexNumber elements to a new primitive double valued matrix.static R064Store
getComplexImaginary(Access2D<ComplexNumber> arg)
Extracts the imaginary part of the ComplexNumber elements to a new primitive double valued matrix.static R064Store
getComplexModulus(Access2D<ComplexNumber> arg)
Extracts the modulus of the ComplexNumber elements to a new primitive double valued matrix.static R064Store
getComplexReal(Access2D<ComplexNumber> arg)
Extracts the real part of the ComplexNumber elements to a new primitive double valued matrix.int
getMaxDim()
int
getMinDim()
int
getRowDim()
private double[]
getWorkerColumn()
int
hashCode()
void
modifyAll(UnaryFunction<java.lang.Double> modifier)
void
modifyColumn(long row, long col, UnaryFunction<java.lang.Double> modifier)
void
modifyDiagonal(long row, long col, UnaryFunction<java.lang.Double> modifier)
void
modifyOne(long row, long col, UnaryFunction<java.lang.Double> modifier)
void
modifyRow(long row, long col, UnaryFunction<java.lang.Double> modifier)
MatrixStore<java.lang.Double>
multiply(MatrixStore<java.lang.Double> right)
java.lang.Double
multiplyBoth(Access1D<java.lang.Double> leftAndRight)
Assumes [leftAndRight] is a vector and will calulate [leftAndRight]H[this][leftAndRight]void
negateColumn(int column)
PhysicalStore.Factory<java.lang.Double,R064Store>
physical()
TransformableRegion<java.lang.Double>
regionByColumns(int... columns)
TransformableRegion<java.lang.Double>
regionByLimits(int rowLimit, int columnLimit)
TransformableRegion<java.lang.Double>
regionByOffsets(int rowOffset, int columnOffset)
TransformableRegion<java.lang.Double>
regionByRows(int... rows)
TransformableRegion<java.lang.Double>
regionByTransposing()
void
rotateRight(int low, int high, double cos, double sin)
void
set(int row, int col, double value)
void
set(long row, long col, java.lang.Comparable<?> value)
void
setToIdentity(int col)
Array1D<java.lang.Double>
sliceColumn(long row, long col)
Array1D<java.lang.Double>
sliceDiagonal(long row, long col)
Array1D<java.lang.Double>
sliceRange(long first, long limit)
Array1D<java.lang.Double>
sliceRow(long row, long col)
void
substituteBackwards(Access2D<java.lang.Double> body, boolean unitDiagonal, boolean conjugated, boolean hermitian)
Will solve the equation system [A][X]=[B] where: [body][this]=[this] is [A][X]=[B] ("this" is the right hand side, and it will be overwritten with the solution). [A] is upper/right triangularvoid
substituteForwards(Access2D<java.lang.Double> body, boolean unitDiagonal, boolean conjugated, boolean identity)
Will solve the equation system [A][X]=[B] where: [body][this]=[this] is [A][X]=[B] ("this" is the right hand side, and it will be overwritten with the solution). [A] is lower/left triangularPrimitiveScalar
toScalar(int row, int col)
Extracts one element of this matrix as a Scalar.java.lang.String
toString()
void
transformLeft(Householder<java.lang.Double> transformation, int firstColumn)
void
transformLeft(Rotation<java.lang.Double> transformation)
As inMatrixStore.premultiply(Access1D)
where the left/parameter matrix is a plane rotation.void
transformRight(Householder<java.lang.Double> transformation, int firstRow)
void
transformRight(Rotation<java.lang.Double> transformation)
As inMatrixStore.multiply(MatrixStore)
where the right/parameter matrix is a plane rotation.void
transformSymmetric(Householder<java.lang.Double> transformation)
void
tred2(BasicArray<java.lang.Double> mainDiagonal, BasicArray<java.lang.Double> offDiagonal, boolean yesvecs)
void
visitColumn(long row, long col, VoidFunction<java.lang.Double> visitor)
void
visitDiagonal(long row, long col, VoidFunction<java.lang.Double> visitor)
void
visitRow(long row, long col, VoidFunction<java.lang.Double> visitor)
static R064Store
wrap(double... data)
static R064Store
wrap(double[] data, int structure)
-
Methods inherited from class org.ojalgo.array.ArrayR064
add, add, axpy, byteValue, copyOfData, dot, doubleValue, exchange, fill, fill, fillOne, fillOne, fillOne, floatValue, get, indexOfLargest, intValue, isAbsolute, isSmall, longValue, make, modify, modify, modify, modifyOne, reset, searchAscending, set, set, set, shortValue, sortAscending, sortDescending, spliterator, stream, supplyTo, visit, visitOne
-
Methods inherited from class org.ojalgo.array.PrimitiveArray
wrap
-
Methods inherited from class org.ojalgo.array.PlainArray
add, add, add, add, add, add, add, add, add, add, add, add, byteValue, count, doubleValue, exchange, fill, fill, fillAll, fillAll, fillRange, fillRange, floatValue, get, indexOfLargest, intValue, longValue, modify, modify, modify, modifyOne, set, set, set, set, set, set, set, set, set, set, set, shortValue, size, visit, visitOne
-
Methods inherited from class org.ojalgo.array.BasicArray
aggregateRange, getMathType, indexOfLargest, isPrimitive, modifyMatching, modifyMatching, modifyRange, visitAll, visitRange, wrapInArray1D, wrapInArray2D, wrapInArrayAnyD
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.ojalgo.structure.Access1D
asCollectable1D, asKeyed1D, axpy, dot, select, supplyTo, toRawCopy1D
-
Methods inherited from interface org.ojalgo.structure.Access1D.Collectable
collect
-
Methods inherited from interface org.ojalgo.structure.Access1D.Visitable
visitAll, visitRange
-
Methods inherited from interface org.ojalgo.structure.Access2D
asCollectable2D, asKeyed2D, byteValue, byteValue, byteValue, byteValue, columns, doubleValue, doubleValue, doubleValue, elements, floatValue, floatValue, floatValue, floatValue, get, intValue, intValue, intValue, intValue, longValue, longValue, longValue, longValue, nonzeros, rows, shortValue, shortValue, shortValue, shortValue, toRawCopy2D
-
Methods inherited from interface org.ojalgo.structure.Access2D.Aggregatable
aggregateColumn, aggregateDiagonal, aggregateRow, reduceColumns, reduceRows
-
Methods inherited from interface org.ojalgo.structure.Access2D.Collectable
collect
-
Methods inherited from interface org.ojalgo.structure.Access2D.Sliceable
sliceDiagonal
-
Methods inherited from interface org.ojalgo.structure.Access2D.Visitable
visitColumn, visitDiagonal, visitOne, visitRow
-
Methods inherited from interface org.ojalgo.matrix.decomposition.DecompositionStore
exchangeColumns, sliceColumn, sliceRow
-
Methods inherited from interface org.ojalgo.matrix.store.ElementsSupplier
onAny, onColumns, onColumns, onMatching, onMatching, onRows, onRows
-
Methods inherited from interface org.ojalgo.matrix.store.MatrixStore
above, above, above, add, add, add, aggregateAll, aggregateColumn, aggregateDiagonal, aggregateRange, aggregateRow, below, below, below, bidiagonal, column, column, columns, columns, diagonal, diagonally, divide, divide, equals, get, hermitian, hessenberg, indexOfLargest, isHermitian, isNormal, isSmall, isSmall, left, left, left, limits, logical, multiply, multiply, multiply, negate, norm, offsets, onAll, operate, power, premultiply, reduceColumns, reduceRows, repeat, right, right, right, row, row, rows, rows, select, select, signum, subtract, subtract, subtract, superimpose, superimpose, symmetric, transpose, triangular, tridiagonal, visitOne
-
Methods inherited from interface org.ojalgo.structure.Mutate1D.Fillable
fillAll, fillAll, fillCompatible, fillRange, fillRange
-
Methods inherited from interface org.ojalgo.structure.Mutate1D.Modifiable
modifyMatching, modifyMatching, modifyRange
-
Methods inherited from interface org.ojalgo.structure.Mutate2D
set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set
-
Methods inherited from interface org.ojalgo.structure.Mutate2D.Fillable
fillColumn, fillColumn, fillColumn, fillDiagonal, fillDiagonal, fillDiagonal, fillDiagonal, fillRow, fillRow, fillRow
-
Methods inherited from interface org.ojalgo.structure.Mutate2D.Modifiable
add, add, add, add, add, add, add, add, add, add, add, add, modifyColumn, modifyDiagonal, modifyMatchingInColumns, modifyMatchingInColumns, modifyMatchingInRows, modifyMatchingInRows, modifyOne, modifyRow
-
Methods inherited from interface org.ojalgo.structure.Mutate2D.ModifiableReceiver
modifyCompatible, modifyCompatible
-
Methods inherited from interface org.ojalgo.structure.Mutate2D.Receiver
isAcceptable
-
Methods inherited from interface org.ojalgo.structure.Operate2D
onAll, onAll, onAll, onAll, onAll, onCompatible, onCompatible
-
Methods inherited from interface org.ojalgo.matrix.store.PhysicalStore
indexOfLargestInColumn, indexOfLargestInRow, indexOfLargestOnDiagonal, modifyAny, supplyTo
-
Methods inherited from interface org.ojalgo.algebra.ScalarOperation.Addition
add
-
Methods inherited from interface org.ojalgo.algebra.ScalarOperation.Division
divide
-
Methods inherited from interface org.ojalgo.algebra.ScalarOperation.Multiplication
multiply
-
Methods inherited from interface org.ojalgo.algebra.ScalarOperation.Subtraction
subtract
-
Methods inherited from interface org.ojalgo.structure.Structure2D
count, firstInColumn, firstInRow, isEmpty, isFat, isScalar, isSquare, isTall, isVector, limitOfColumn, limitOfRow, size
-
Methods inherited from interface org.ojalgo.matrix.store.TransformableRegion
synchronised
-
-
-
-
Field Detail
-
FACTORY
public static final PhysicalStore.Factory<java.lang.Double,R064Store> FACTORY
-
ELEMENT_SIZE
static final long ELEMENT_SIZE
-
SHALLOW_SIZE
static final long SHALLOW_SIZE
-
multiplyBoth
private final MultiplyBoth.Primitive multiplyBoth
-
multiplyLeft
private final MultiplyLeft.Primitive64 multiplyLeft
-
multiplyNeither
private final MultiplyNeither.Primitive64 multiplyNeither
-
multiplyRight
private final MultiplyRight.Primitive64 multiplyRight
-
myColDim
private final int myColDim
-
myRowDim
private final int myRowDim
-
myUtility
private final Array2D<java.lang.Double> myUtility
-
myWorkerColumn
private transient double[] myWorkerColumn
-
-
Method Detail
-
getComplexArgument
public static R064Store getComplexArgument(Access2D<ComplexNumber> arg)
Extracts the argument of the ComplexNumber elements to a new primitive double valued matrix.
-
getComplexImaginary
public static R064Store getComplexImaginary(Access2D<ComplexNumber> arg)
Extracts the imaginary part of the ComplexNumber elements to a new primitive double valued matrix.
-
getComplexModulus
public static R064Store getComplexModulus(Access2D<ComplexNumber> arg)
Extracts the modulus of the ComplexNumber elements to a new primitive double valued matrix.
-
getComplexReal
public static R064Store getComplexReal(Access2D<ComplexNumber> arg)
Extracts the real part of the ComplexNumber elements to a new primitive double valued matrix.
-
wrap
public static R064Store wrap(double... data)
-
wrap
public static R064Store wrap(double[] data, int structure)
-
cast
static Householder.Primitive64 cast(Householder<java.lang.Double> transformation)
-
cast
static Rotation.Primitive cast(Rotation<java.lang.Double> transformation)
-
accept
public void accept(Access2D<?> supplied)
- Specified by:
accept
in interfacejava.util.function.Consumer<Access2D<?>>
- Specified by:
accept
in interfaceMutate2D.Receiver<java.lang.Double>
-
add
public void add(long row, long col, java.lang.Comparable<?> addend)
- Specified by:
add
in interfaceMutate2D.Modifiable<java.lang.Double>
-
add
public void add(long row, long col, double addend)
- Specified by:
add
in interfaceMutate2D.Modifiable<java.lang.Double>
-
applyCholesky
public void applyCholesky(int iterationPoint, BasicArray<java.lang.Double> multipliers)
Description copied from interface:DecompositionStore
Cholesky transformations- Specified by:
applyCholesky
in interfaceDecompositionStore<java.lang.Double>
-
applyLDL
public void applyLDL(int iterationPoint, BasicArray<java.lang.Double> multipliers)
Description copied from interface:DecompositionStore
LDL transformations- Specified by:
applyLDL
in interfaceDecompositionStore<java.lang.Double>
-
applyLU
public void applyLU(int iterationPoint, BasicArray<java.lang.Double> multipliers)
Description copied from interface:DecompositionStore
LU transformations- Specified by:
applyLU
in interfaceDecompositionStore<java.lang.Double>
-
asList
public Array1D<java.lang.Double> asList()
- Specified by:
asList
in interfacePhysicalStore<java.lang.Double>
- Returns:
- The elements of the physical store as a fixed size (1 dimensional) list. The elements may be accessed either row or colomn major.
-
build
public R064Store build()
- Specified by:
build
in interfaceFactory1D.Builder<DenseArray<java.lang.Double>>
- Specified by:
build
in interfaceFactory2D.Builder<R064Store>
- Overrides:
build
in classDenseArray<java.lang.Double>
-
caxpy
public void caxpy(double aSclrA, int aColX, int aColY, int aFirstRow)
-
computeInPlaceSchur
public Array1D<ComplexNumber> computeInPlaceSchur(PhysicalStore<java.lang.Double> transformationCollector, boolean eigenvalue)
- Specified by:
computeInPlaceSchur
in interfaceDecompositionStore<java.lang.Double>
-
conjugate
public MatrixStore<java.lang.Double> conjugate()
Description copied from interface:MatrixStore
Returns the conjugate transpose of this matrix. The conjugate transpose is also known as adjoint matrix, adjugate matrix, hermitian adjoint or hermitian transpose. (The conjugate matrix is the complex conjugate of each element. This NOT what is returned here!)- Specified by:
conjugate
in interfaceMatrixStore<java.lang.Double>
- Specified by:
conjugate
in interfaceStructure2D.Logical<Access2D<java.lang.Double>,MatrixStore<java.lang.Double>>
- Specified by:
conjugate
in interfaceVectorSpace<MatrixStore<java.lang.Double>,java.lang.Double>
- See Also:
VectorSpace.conjugate()
-
copy
public R064Store copy()
Description copied from interface:MatrixStore
Each call must produce a new instance.- Specified by:
copy
in interfaceMatrixStore<java.lang.Double>
- Returns:
- A new PhysicalStore copy.
-
countColumns
public long countColumns()
Description copied from interface:Structure2D
Only need to implement if the structure may contain more than Integer.MAX_VALUE elements.- Specified by:
countColumns
in interfaceStructure2D
- Returns:
- The number of columns
-
countRows
public long countRows()
Description copied from interface:Structure2D
Only need to implement if the structure may contain more than Integer.MAX_VALUE elements.- Specified by:
countRows
in interfaceStructure2D
- Returns:
- The number of rows
-
divideAndCopyColumn
public void divideAndCopyColumn(int row, int column, BasicArray<java.lang.Double> destination)
- Specified by:
divideAndCopyColumn
in interfaceDecompositionStore<java.lang.Double>
-
doubleValue
public double doubleValue(int row, int col)
Description copied from interface:Access2D
Extracts one element of this matrix as a double.- Specified by:
doubleValue
in interfaceAccess2D<java.lang.Double>
- Specified by:
doubleValue
in interfaceMatrixStore<java.lang.Double>
- Parameters:
row
- A row index.col
- A column index.- Returns:
- One matrix element
-
exchangeColumns
public void exchangeColumns(long colA, long colB)
- Specified by:
exchangeColumns
in interfaceMutate2D.Exchangeable
- Specified by:
exchangeColumns
in interfaceTransformableRegion<java.lang.Double>
-
exchangeHermitian
public void exchangeHermitian(int indexA, int indexB)
- Specified by:
exchangeHermitian
in interfaceDecompositionStore<java.lang.Double>
-
exchangeRows
public void exchangeRows(long rowA, long rowB)
- Specified by:
exchangeRows
in interfaceMutate2D.Exchangeable
- Specified by:
exchangeRows
in interfaceTransformableRegion<java.lang.Double>
-
fillCompatible
public void fillCompatible(Access2D<java.lang.Double> left, BinaryFunction<java.lang.Double> operator, Access2D<java.lang.Double> right)
Description copied from interface:Mutate2D.Fillable
'this' needs to be of a size compatible with the 'left' and 'right' matrices. No checks are performed. The term "compatible" refers to MATLAB's rules for "array broadcasting". The result will be the same as if the 'left' and 'right' matrices where expanded (repeated) so that all three where of the same size, and then the operation was performed. The actual implementation may be more efficient than that.- Specified by:
fillCompatible
in interfaceMutate2D.Fillable<java.lang.Double>
-
fillByMultiplying
public void fillByMultiplying(Access1D<java.lang.Double> left, Access1D<java.lang.Double> right)
- Specified by:
fillByMultiplying
in interfaceTransformableRegion<java.lang.Double>
-
fillColumn
public void fillColumn(long row, long col, Access1D<java.lang.Double> values)
- Specified by:
fillColumn
in interfaceMutate2D.Fillable<java.lang.Double>
-
fillColumn
public void fillColumn(long row, long col, java.lang.Double value)
- Specified by:
fillColumn
in interfaceMutate2D.Fillable<java.lang.Double>
-
fillColumn
public void fillColumn(long row, long col, NullaryFunction<?> supplier)
- Specified by:
fillColumn
in interfaceMutate2D.Fillable<java.lang.Double>
-
fillDiagonal
public void fillDiagonal(long row, long col, java.lang.Double value)
- Specified by:
fillDiagonal
in interfaceMutate2D.Fillable<java.lang.Double>
-
fillDiagonal
public void fillDiagonal(long row, long col, NullaryFunction<?> supplier)
- Specified by:
fillDiagonal
in interfaceMutate2D.Fillable<java.lang.Double>
-
fillMatching
public void fillMatching(Access1D<?> values)
Description copied from interface:Mutate1D.Fillable
Will fill the elements of [this] with the corresponding input values, and in the process (if necessary) convert the elements to the correct type:
this(i) = values(i)
- Specified by:
fillMatching
in interfaceMutate1D.Fillable<java.lang.Double>
- Overrides:
fillMatching
in classArrayR064
-
fillMatching
public void fillMatching(Access1D<java.lang.Double> left, BinaryFunction<java.lang.Double> function, Access1D<java.lang.Double> right)
- Specified by:
fillMatching
in interfaceMutate1D.Fillable<java.lang.Double>
- Overrides:
fillMatching
in classArrayR064
-
fillMatching
public void fillMatching(UnaryFunction<java.lang.Double> function, Access1D<java.lang.Double> arguments)
- Specified by:
fillMatching
in interfaceMutate1D.Fillable<java.lang.Double>
- Overrides:
fillMatching
in classArrayR064
-
fillRow
public void fillRow(long row, long col, Access1D<java.lang.Double> values)
- Specified by:
fillRow
in interfaceMutate2D.Fillable<java.lang.Double>
-
fillRow
public void fillRow(long row, long col, java.lang.Double value)
- Specified by:
fillRow
in interfaceMutate2D.Fillable<java.lang.Double>
-
fillRow
public void fillRow(long row, long col, NullaryFunction<?> supplier)
- Specified by:
fillRow
in interfaceMutate2D.Fillable<java.lang.Double>
-
generateApplyAndCopyHouseholderColumn
public boolean generateApplyAndCopyHouseholderColumn(int row, int column, Householder<java.lang.Double> destination)
- Specified by:
generateApplyAndCopyHouseholderColumn
in interfaceDecompositionStore<java.lang.Double>
-
generateApplyAndCopyHouseholderRow
public boolean generateApplyAndCopyHouseholderRow(int row, int column, Householder<java.lang.Double> destination)
- Specified by:
generateApplyAndCopyHouseholderRow
in interfaceDecompositionStore<java.lang.Double>
-
get
public MatrixStore<java.lang.Double> get()
- Specified by:
get
in interfaceMatrixStore<java.lang.Double>
-
get
public java.lang.Double get(int row, int col)
- Specified by:
get
in interfaceMatrixStore<java.lang.Double>
-
getColDim
public int getColDim()
- Specified by:
getColDim
in interfaceStructure2D
- Returns:
- The number of columns
-
getMaxDim
public int getMaxDim()
- Specified by:
getMaxDim
in interfaceStructure2D
-
getMinDim
public int getMinDim()
- Specified by:
getMinDim
in interfaceStructure2D
-
getRowDim
public int getRowDim()
- Specified by:
getRowDim
in interfaceStructure2D
- Returns:
- The number of rows
-
modifyAll
public void modifyAll(UnaryFunction<java.lang.Double> modifier)
- Specified by:
modifyAll
in interfaceMutate1D.Modifiable<java.lang.Double>
- Overrides:
modifyAll
in classBasicArray<java.lang.Double>
-
modifyColumn
public void modifyColumn(long row, long col, UnaryFunction<java.lang.Double> modifier)
- Specified by:
modifyColumn
in interfaceMutate2D.Modifiable<java.lang.Double>
-
modifyDiagonal
public void modifyDiagonal(long row, long col, UnaryFunction<java.lang.Double> modifier)
- Specified by:
modifyDiagonal
in interfaceMutate2D.Modifiable<java.lang.Double>
-
modifyOne
public void modifyOne(long row, long col, UnaryFunction<java.lang.Double> modifier)
- Specified by:
modifyOne
in interfaceMutate2D.Modifiable<java.lang.Double>
-
modifyRow
public void modifyRow(long row, long col, UnaryFunction<java.lang.Double> modifier)
- Specified by:
modifyRow
in interfaceMutate2D.Modifiable<java.lang.Double>
-
multiply
public MatrixStore<java.lang.Double> multiply(MatrixStore<java.lang.Double> right)
- Specified by:
multiply
in interfaceMatrixStore<java.lang.Double>
- Specified by:
multiply
in interfaceOperation.Multiplication<MatrixStore<java.lang.Double>>
- Parameters:
right
- The multiplicand- Returns:
this * multiplicand
.
-
multiplyBoth
public java.lang.Double multiplyBoth(Access1D<java.lang.Double> leftAndRight)
Description copied from interface:MatrixStore
Assumes [leftAndRight] is a vector and will calulate [leftAndRight]H[this][leftAndRight]- Specified by:
multiplyBoth
in interfaceMatrixStore<java.lang.Double>
- Parameters:
leftAndRight
- The argument vector- Returns:
- A scalar (extracted from the resulting 1 x 1 matrix)
-
negateColumn
public void negateColumn(int column)
- Specified by:
negateColumn
in interfaceNegateColumn
-
physical
public PhysicalStore.Factory<java.lang.Double,R064Store> physical()
- Specified by:
physical
in interfaceMatrixStore<java.lang.Double>
-
regionByColumns
public TransformableRegion<java.lang.Double> regionByColumns(int... columns)
- Specified by:
regionByColumns
in interfaceTransformableRegion<java.lang.Double>
- Returns:
- A consumer (sub)region
-
regionByLimits
public TransformableRegion<java.lang.Double> regionByLimits(int rowLimit, int columnLimit)
- Specified by:
regionByLimits
in interfaceTransformableRegion<java.lang.Double>
- Returns:
- A consumer (sub)region
-
regionByOffsets
public TransformableRegion<java.lang.Double> regionByOffsets(int rowOffset, int columnOffset)
- Specified by:
regionByOffsets
in interfaceTransformableRegion<java.lang.Double>
- Returns:
- A consumer (sub)region
-
regionByRows
public TransformableRegion<java.lang.Double> regionByRows(int... rows)
- Specified by:
regionByRows
in interfaceTransformableRegion<java.lang.Double>
- Returns:
- A consumer (sub)region
-
regionByTransposing
public TransformableRegion<java.lang.Double> regionByTransposing()
- Specified by:
regionByTransposing
in interfaceTransformableRegion<java.lang.Double>
- Returns:
- A transposed consumer region
-
rotateRight
public void rotateRight(int low, int high, double cos, double sin)
- Specified by:
rotateRight
in interfaceRotateRight
-
set
public void set(long row, long col, java.lang.Comparable<?> value)
-
setToIdentity
public void setToIdentity(int col)
- Specified by:
setToIdentity
in interfaceDecompositionStore<java.lang.Double>
-
sliceColumn
public Array1D<java.lang.Double> sliceColumn(long row, long col)
- Specified by:
sliceColumn
in interfaceAccess2D.Sliceable<java.lang.Double>
- Specified by:
sliceColumn
in interfaceDecompositionStore<java.lang.Double>
- Specified by:
sliceColumn
in interfaceMatrixStore<java.lang.Double>
-
sliceDiagonal
public Array1D<java.lang.Double> sliceDiagonal(long row, long col)
- Specified by:
sliceDiagonal
in interfaceAccess2D.Sliceable<java.lang.Double>
- Specified by:
sliceDiagonal
in interfaceDecompositionStore<java.lang.Double>
- Specified by:
sliceDiagonal
in interfaceMatrixStore<java.lang.Double>
-
sliceRange
public Array1D<java.lang.Double> sliceRange(long first, long limit)
- Specified by:
sliceRange
in interfaceAccess1D.Sliceable<java.lang.Double>
- Specified by:
sliceRange
in interfaceDecompositionStore<java.lang.Double>
- Specified by:
sliceRange
in interfaceMatrixStore<java.lang.Double>
-
sliceRow
public Array1D<java.lang.Double> sliceRow(long row, long col)
- Specified by:
sliceRow
in interfaceAccess2D.Sliceable<java.lang.Double>
- Specified by:
sliceRow
in interfaceDecompositionStore<java.lang.Double>
- Specified by:
sliceRow
in interfaceMatrixStore<java.lang.Double>
-
substituteBackwards
public void substituteBackwards(Access2D<java.lang.Double> body, boolean unitDiagonal, boolean conjugated, boolean hermitian)
Description copied from interface:PhysicalStore
Will solve the equation system [A][X]=[B] where:- [body][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
- Specified by:
substituteBackwards
in interfacePhysicalStore<java.lang.Double>
- See Also:
SubstituteBackwards.invoke(double[], int, int, int, Access2D, boolean, boolean, boolean)
-
substituteForwards
public void substituteForwards(Access2D<java.lang.Double> body, boolean unitDiagonal, boolean conjugated, boolean identity)
Description copied from interface:PhysicalStore
Will solve the equation system [A][X]=[B] where:- [body][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
- Specified by:
substituteForwards
in interfacePhysicalStore<java.lang.Double>
- See Also:
SubstituteForwards.invoke(double[], int, int, int, Access2D, boolean, boolean, boolean)
-
toScalar
public PrimitiveScalar toScalar(int row, int col)
Description copied from interface:Matrix2D
Extracts one element of this matrix as a Scalar.- Specified by:
toScalar
in interfaceMatrix2D<java.lang.Double,MatrixStore<java.lang.Double>>
- Specified by:
toScalar
in interfaceMatrixStore<java.lang.Double>
- Parameters:
row
- A row index.col
- A column index.- Returns:
- One matrix element as a Scalar.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classBasicArray<java.lang.Double>
-
transformLeft
public void transformLeft(Householder<java.lang.Double> transformation, int firstColumn)
- Specified by:
transformLeft
in interfacePhysicalStore<java.lang.Double>
-
transformLeft
public void transformLeft(Rotation<java.lang.Double> transformation)
Description copied from interface:PhysicalStore
As in
MatrixStore.premultiply(Access1D)
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.
- Specified by:
transformLeft
in interfacePhysicalStore<java.lang.Double>
- See Also:
PhysicalStore.transformRight(Rotation)
-
transformRight
public void transformRight(Householder<java.lang.Double> transformation, int firstRow)
- Specified by:
transformRight
in interfacePhysicalStore<java.lang.Double>
-
transformRight
public void transformRight(Rotation<java.lang.Double> transformation)
Description copied from interface:PhysicalStore
As in
MatrixStore.multiply(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).
- Specified by:
transformRight
in interfacePhysicalStore<java.lang.Double>
- See Also:
PhysicalStore.transformLeft(Rotation)
-
transformSymmetric
public void transformSymmetric(Householder<java.lang.Double> transformation)
- Specified by:
transformSymmetric
in interfaceDecompositionStore<java.lang.Double>
-
tred2
public void tred2(BasicArray<java.lang.Double> mainDiagonal, BasicArray<java.lang.Double> offDiagonal, boolean yesvecs)
- Specified by:
tred2
in interfaceDecompositionStore<java.lang.Double>
-
visitColumn
public void visitColumn(long row, long col, VoidFunction<java.lang.Double> visitor)
- Specified by:
visitColumn
in interfaceAccess2D.Visitable<java.lang.Double>
-
visitDiagonal
public void visitDiagonal(long row, long col, VoidFunction<java.lang.Double> visitor)
- Specified by:
visitDiagonal
in interfaceAccess2D.Visitable<java.lang.Double>
-
visitRow
public void visitRow(long row, long col, VoidFunction<java.lang.Double> visitor)
- Specified by:
visitRow
in interfaceAccess2D.Visitable<java.lang.Double>
-
getWorkerColumn
private double[] getWorkerColumn()
-
-