|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ojalgo.array.PrimitiveArray
org.ojalgo.matrix.store.PrimitiveDenseStore
public final class PrimitiveDenseStore
A Double (actually double) implementation of PhysicalStore.
| Nested Class Summary |
|---|
| 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 PhysicalStore.Factory<Double> |
FACTORY
|
int |
length
|
| Method Summary | |
|---|---|
Double |
aggregateAll(ChainableAggregator aVisitor)
|
Double |
aggregateAll(CollectableAggregator aVisitor)
|
Array1D<N> |
asArray1D()
A utility facade that conveniently/consistently presents the BasicArray as a one-dimensional array. |
Array2D<Double> |
asArray2D()
|
Array2D<N> |
asArray2D(int aRowDim,
int aColDim)
A utility facade that conveniently/consistently presents the BasicArray as a two-dimensional array. |
ArrayAnyD<N> |
asArrayAnyD(int[] aStructure)
A utility facade that conveniently/consistently presents the BasicArray as a multi-dimensional array. |
Array1D<Double> |
asList()
|
MatrixStore.Builder<Double> |
builder()
|
void |
caxpy(Double aSclrA,
int aColX,
int aColY,
int aFirstRow)
column a * x plus y |
boolean |
computeInPlaceCholesky(boolean checkForSPD)
|
LUDecomposition.Pivot |
computeInPlaceLU(boolean assumeNoPivotingRequired)
|
void |
computeInPlaceQR()
|
PrimitiveDenseStore |
conjugate()
Each call must produce a new instance. |
PrimitiveDenseStore |
copy()
Each call must produce a new instance. |
double |
doubleValue(int aRow,
int aCol)
|
boolean |
equals(MatrixStore<Double> aStore,
NumberContext aCntxt)
|
boolean |
equals(Object anObj)
|
void |
exchangeColumns(int aColA,
int aColB)
|
void |
exchangeRows(int aRowA,
int aRowB)
|
void |
extractAndTransform(MatrixStore<Double> aHouseholderColumnsStore,
int aHouseholderColumnIndex,
int aFirstTargetColumn,
Object aWorkCopy)
|
Householder<Double> |
extractHouseholderColumn(int aCol)
|
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)
|
Householder<Double> |
generateHouseholderColumn(int aRow,
int aCol)
|
Householder<Double> |
generateHouseholderRow(int aRow,
int aCol)
|
Double |
get(int aRow,
int aCol)
|
int |
getColDim()
|
PhysicalStore.Factory<Double> |
getFactory()
|
int |
getIndexOfLargestInColumn(int aRow,
int aCol)
|
int |
getIndexOfLargestInRow(int aRow,
int aCol)
|
int |
getMinDim()
|
Double |
getNumber(int aRow,
int aCol)
Deprecated. Use get(int,int) instead |
int |
getRowDim()
|
int |
hashCode()
|
boolean |
isAbsolute(int aRow,
int aCol)
|
boolean |
isLowerLeftShaded()
The lower (left) triangle is shaded leaving an upper Hessenberg matrix. |
boolean |
isReal(int aRow,
int aCol)
|
boolean |
isShaded()
Either the lower (left) or the upper (right) triangles are shaded. |
boolean |
isUpperRightShaded()
The upper (right) triangle is shaded leaving a lower Hessenberg matrix. |
boolean |
isZero(int aRow,
int aCol)
|
void |
maxpy(Double aSclrA,
MatrixStore<Double> aMtrxX)
matrix a * x plus y |
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)
|
MatrixStore<Double> |
multiplyLeft(MatrixStore<Double> aStore)
|
MatrixStore<Double> |
multiplyRight(MatrixStore<Double> aStore)
|
void |
raxpy(Double aSclrA,
int aRowX,
int aRowY,
int aFirstCol)
row a * x plus y |
void |
set(int aRow,
int aCol,
double aNmbr)
|
void |
set(int aRow,
int aCol,
Double aNmbr)
|
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()
|
int |
size()
|
void |
substituteBackwards(Access2D<Double> aBody,
boolean assumeOne,
boolean transposed)
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 assumeOne)
Deprecated. v29 Use substituteBackwards(Access2D,boolean,boolean) instead |
void |
substituteForwards(Access2D<Double> aBody,
boolean assumeOne,
boolean transposed)
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 assumeOne)
Deprecated. v29 Use substituteForwards(Access2D,boolean,boolean) instead |
double[][] |
toRawCopy()
|
PrimitiveScalar |
toScalar(int aRow,
int aCol)
|
String |
toString()
|
void |
toTridiagonal(PhysicalStore<Double> aMtrxV)
|
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. |
PrimitiveDenseStore |
transpose()
Each call must produce a new instance. |
void |
unshade()
Unshades both the lower (left) and upper (right) triangles. |
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 org.ojalgo.array.PrimitiveArray |
|---|
doubleValue, exchange, fill, fill, fill, fill, get, getIndexOfLargest, getNumber, isAbsolute, isReal, isZero, modify, modify, modify, modify, modify, modify, searchAscending, set, set, sortAscending, toScalar, visit |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final PhysicalStore.Factory<Double> FACTORY
public final int length
| Method Detail |
|---|
public Double aggregateAll(ChainableAggregator aVisitor)
aggregateAll in interface MatrixStore<Double>public Double aggregateAll(CollectableAggregator aVisitor)
aggregateAll in interface MatrixStore<Double>public Array2D<Double> asArray2D()
public Array1D<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 boolean computeInPlaceCholesky(boolean checkForSPD)
computeInPlaceCholesky in interface CholeskyDecomposition.Store<Double>public LUDecomposition.Pivot computeInPlaceLU(boolean assumeNoPivotingRequired)
computeInPlaceLU in interface LUDecomposition.Store<Double>public void computeInPlaceQR()
computeInPlaceQR in interface QRDecomposition.Store<Double>public PrimitiveDenseStore conjugate()
MatrixStore
conjugate in interface MatrixStore<Double>public PrimitiveDenseStore copy()
MatrixStore
copy in interface MatrixStore<Double>
public double doubleValue(int aRow,
int aCol)
doubleValue in interface Access2D<Double>
public boolean equals(MatrixStore<Double> aStore,
NumberContext aCntxt)
equals in interface MatrixStore<Double>public boolean equals(Object anObj)
equals in class PrimitiveArray
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 extractAndTransform(MatrixStore<Double> aHouseholderColumnsStore,
int aHouseholderColumnIndex,
int aFirstTargetColumn,
Object aWorkCopy)
extractAndTransform in interface QRDecomposition.Store<Double>aHouseholderColumnsStore - The MatrixStore
where the householder column is stored.aHouseholderColumnIndex - the index of the householder
column in aHouseholderColumnsStore.aFirstTargetColumn - The first column of "this" to be
transformed.aWorkCopy - An array (values not set) for
internal/temporary storage of the householder column.public Householder<Double> extractHouseholderColumn(int aCol)
extractHouseholderColumn in interface QRDecomposition.Store<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 Householder<Double> generateHouseholderColumn(int aRow,
int aCol)
generateHouseholderColumn in interface PhysicalStore<Double>
public Householder<Double> generateHouseholderRow(int aRow,
int aCol)
generateHouseholderRow in interface PhysicalStore<Double>
public Double get(int aRow,
int aCol)
get in interface Access2D<Double>public int getColDim()
public PhysicalStore.Factory<Double> getFactory()
getFactory in interface MatrixStore<Double>
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 int getMinDim()
@Deprecated
public Double getNumber(int aRow,
int aCol)
get(int,int) instead
public int getRowDim()
public int hashCode()
hashCode in class PrimitiveArray
public boolean isAbsolute(int aRow,
int aCol)
isAbsolute in interface MatrixStore<Double>Scalar.isAbsolute()public 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 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 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 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 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 MatrixStore<Double> multiplyLeft(MatrixStore<Double> aStore)
multiplyLeft in interface MatrixStore<Double>public MatrixStore<Double> multiplyRight(MatrixStore<Double> aStore)
multiplyRight 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 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 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 void substituteBackwards(Access2D<Double> aBody,
boolean assumeOne,
boolean transposed)
PhysicalStore
substituteBackwards in interface PhysicalStore<Double>aBody - The equation system body parameters [A]assumeOne - true if aBody as ones on the diagonaltransposed - 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 assumeOne)
substituteBackwards(Access2D,boolean,boolean) instead
substituteBackwards in interface PhysicalStore<Double>
public void substituteForwards(Access2D<Double> aBody,
boolean assumeOne,
boolean transposed)
PhysicalStore
substituteForwards in interface PhysicalStore<Double>aBody - The equation system body parameters [A]assumeOne - true if aBody as ones on the diagonaltransposed - 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 assumeOne)
substituteForwards(Access2D,boolean,boolean) instead
substituteForwards in interface PhysicalStore<Double>public double[][] toRawCopy()
toRawCopy in interface MatrixStore<Double>
public PrimitiveScalar toScalar(int aRow,
int aCol)
toScalar in interface Access2D<Double>public final void toTridiagonal(PhysicalStore<Double> aMtrxV)
public 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 PrimitiveDenseStore transpose()
MatrixStore
transpose in interface MatrixStore<Double>public void unshade()
PhysicalStore
unshade in interface PhysicalStore<Double>PhysicalStore.shadeLowerLeft(),
PhysicalStore.shadeUpperRight()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>public int size()
public final Array1D<N> asArray1D()
A utility facade that conveniently/consistently presents the BasicArray as a one-dimensional array. Note that you will modify the actual array by accessing it through this facade.
Disregards the array structure, and simply treats it as one-domensional.
public final Array2D<N> asArray2D(int aRowDim,
int aColDim)
A utility facade that conveniently/consistently presents the BasicArray as a two-dimensional array. Note that you will modify the actual array by accessing it through this facade.
If "this" has more than two dimensions then only the first plane of the first cube of the first... is used/accessed. If this only has one dimension then everything is assumed to be in the first column of the first plane of the first cube...
public final ArrayAnyD<N> asArrayAnyD(int[] aStructure)
A utility facade that conveniently/consistently presents the BasicArray as a multi-dimensional array. Note that you will modify the actual array by accessing it through this facade.
public final int size()
public String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||