|
|||||||||
| 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.
| Field Summary | |
|---|---|
static PhysicalFactory<Double> |
FACTORY
|
int |
length
|
| Method Summary | |
|---|---|
void |
add(Double aNmbr)
|
void |
add(PhysicalStore<Double> aStore)
|
void |
applyHouseholder(int aFirstTargetCol,
MatrixStore<Double> aHouseholderStore,
int aHouseholderCol,
Object aColumnArray)
|
Double |
calculateColumnNorm(int aRow,
int aCol,
int aDegree)
|
Double |
calculateRowNorm(int aRow,
int aCol,
int aDegree)
|
Double |
calculateTrace()
|
Double |
calculateVectorNorm(int aDegree)
|
Double |
calculateVectorProduct(PhysicalStore<Double> aStore)
|
boolean |
computeCholesky()
|
LUDecomposition.Pivot |
computeLU()
|
void |
computeQR()
|
PrimitiveDenseStore |
copy()
Each call must produce a new instance. |
Double |
countNonZeroElements()
|
void |
divide(Double aNmbr)
|
void |
divideElements(PhysicalStore<Double> aStore)
|
double |
doubleValue(int aRow,
int aCol)
|
boolean |
equals(PhysicalStore<Double> aStore,
NumberContext aCntxt)
|
void |
exchangeRows(int aRowA,
int aRowB)
|
int |
getColDim()
|
Double |
getLargestElement()
|
int |
getMinDim()
|
Double |
getNumber(int aRow,
int aCol)
|
PhysicalFactory<Double> |
getPhysicalFactory()
|
int |
getRowDim()
|
boolean |
isAbsolute(int aRow,
int aCol)
|
boolean |
isLowerLeftShaded()
The lower (left) triangle is shaded leaving an upper Hessenberg matrix. |
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 |
multiply(Double aNmbr)
|
Double |
multiplyBothSides(MatrixStore<Double> aStore)
Calculates [aStore]T[this][aStore] as in a quadratic function [x]T[Q][x]. |
void |
multiplyElements(PhysicalStore<Double> aStore)
|
MatrixStore<Double> |
multiplyLeft(MatrixStore<Double> aStore)
|
void |
multiplyLeft(Rotation<Double> aRotation)
|
MatrixStore<Double> |
multiplyRight(MatrixStore<Double> aStore)
|
void |
multiplyRight(Rotation<Double> aRotation)
|
void |
negateAll()
|
void |
rotateLeft(int aLowerIndex,
int aHigherIndex,
Double anAngle)
As in MatrixStore.multiplyLeft(MatrixStore) where the
left/parameter matrix is a plane rotation. |
void |
rotateRight(int aLowerIndex,
int aHigherIndex,
Double anAngle)
As in MatrixStore.multiplyRight(MatrixStore) where the
right/parameter matrix is a plane rotation. |
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()
|
void |
substituteBackwards(MatrixStore<Double> aBody,
boolean assumeOne)
|
void |
substituteForwards(MatrixStore<Double> aBody,
boolean assumeOne)
|
void |
subtract(Double aNmbr)
|
void |
subtract(PhysicalStore<Double> aStore)
|
List<Double> |
toList()
|
PhysicalStore<Double> |
toPhysicalStore()
May (probably will) return the same instance with every call. |
double[][] |
toRawCopy()
|
Scalar<Double> |
toScalar(int aRow,
int aCol)
|
String |
toString()
|
Array1Dim<N> |
toUtility1Dim()
A utility facade that conveniently/consistently presents the BasicArray as a one-dimensional array. |
Array2Dim<N> |
toUtility2Dim()
A utility facade that conveniently/consistently presents the BasicArray as a two-dimensional array. |
ArrayAnyDim<N> |
toUtilityAnyDim()
A utility facade that conveniently/consistently presents the BasicArray as a multi-dimensional array. |
void |
unshade()
Unshades both the lower (left) and upper (right) triangles. |
| Methods inherited from class org.ojalgo.array.PrimitiveArray |
|---|
doubleValue, enforceAll, equals, equals, exchangeSets, fillAll, fillOne, fillSet, fillSet, getNumber, hashCode, isAbsolute, isReal, isZero, modifyAll, modifyAll, modifyAll, modifyOne, modifyOne, modifyOne, modifySet, modifySet, modifySet, modifySet, modifySet, modifySet, searchAscending, sortAscending, toScalar, visitAll, visitOne, visitSet, visitSet |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.ojalgo.matrix.store.PhysicalStore |
|---|
enforceAll, fillAll, visitAll |
| Field Detail |
|---|
public static final PhysicalFactory<Double> FACTORY
public final int length
| Method Detail |
|---|
public void add(Double aNmbr)
add in interface PhysicalStore<Double>public void add(PhysicalStore<Double> aStore)
add in interface PhysicalStore<Double>
public void applyHouseholder(int aFirstTargetCol,
MatrixStore<Double> aHouseholderStore,
int aHouseholderCol,
Object aColumnArray)
aFirstTargetCol - The first column of "this" to be transformed.aHouseholderStore - The MatrixStore where the householder
column is stored.aHouseholderCol - the index of the householder column in aHouseholderStore.aColumnArray - An array (values not set) for internal/temporary
storage of the householder column. Should be of type N[] or double[].
public Double calculateColumnNorm(int aRow,
int aCol,
int aDegree)
calculateColumnNorm in interface PhysicalStore<Double>
public Double calculateRowNorm(int aRow,
int aCol,
int aDegree)
calculateRowNorm in interface PhysicalStore<Double>public Double calculateTrace()
calculateTrace in interface PhysicalStore<Double>public Double calculateVectorNorm(int aDegree)
calculateVectorNorm in interface PhysicalStore<Double>public Double calculateVectorProduct(PhysicalStore<Double> aStore)
calculateVectorProduct in interface PhysicalStore<Double>public boolean computeCholesky()
computeCholesky in interface CholeskyDecomposition.CholeskyStore<Double>public LUDecomposition.Pivot computeLU()
computeLU in interface LUDecomposition.LUStore<Double>LUDecomposition.LUStore.computeLU()public void computeQR()
computeQR in interface QRDecomposition.QRStore<Double>public PrimitiveDenseStore copy()
PhysicalStore
copy in interface PhysicalStore<Double>PhysicalStore copy.public Double countNonZeroElements()
countNonZeroElements in interface PhysicalStore<Double>public void divide(Double aNmbr)
divide in interface PhysicalStore<Double>public void divideElements(PhysicalStore<Double> aStore)
divideElements in interface PhysicalStore<Double>
public double doubleValue(int aRow,
int aCol)
doubleValue in interface MatrixStore<Double>
public boolean equals(PhysicalStore<Double> aStore,
NumberContext aCntxt)
equals in interface PhysicalStore<Double>
public void exchangeRows(int aRowA,
int aRowB)
exchangeRows in interface PhysicalStore<Double>public int getColDim()
getColDim in interface MatrixStore<Double>public Double getLargestElement()
getLargestElement in interface PhysicalStore<Double>public int getMinDim()
getMinDim in interface MatrixStore<Double>
public Double getNumber(int aRow,
int aCol)
getNumber in interface MatrixStore<Double>public PhysicalFactory<Double> getPhysicalFactory()
getPhysicalFactory in interface MatrixStore<Double>public int getRowDim()
getRowDim in interface MatrixStore<Double>
public boolean isAbsolute(int aRow,
int aCol)
isAbsolute in interface PhysicalStore<Double>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 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 PhysicalStore<Double>public void multiply(Double aNmbr)
multiply in interface PhysicalStore<Double>public Double multiplyBothSides(MatrixStore<Double> aStore)
MatrixStore
multiplyBothSides in interface MatrixStore<Double>public void multiplyElements(PhysicalStore<Double> aStore)
multiplyElements in interface PhysicalStore<Double>public MatrixStore<Double> multiplyLeft(MatrixStore<Double> aStore)
multiplyLeft in interface MatrixStore<Double>public void multiplyLeft(Rotation<Double> aRotation)
multiplyLeft in interface PhysicalStore<Double>public MatrixStore<Double> multiplyRight(MatrixStore<Double> aStore)
multiplyRight in interface MatrixStore<Double>public void multiplyRight(Rotation<Double> aRotation)
multiplyRight in interface PhysicalStore<Double>public void negateAll()
negateAll in interface PhysicalStore<Double>
public void rotateLeft(int aLowerIndex,
int aHigherIndex,
Double anAngle)
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.
rotateLeft in interface PhysicalStore<Double>PhysicalStore.rotateRight(int, int, Number)
public void rotateRight(int aLowerIndex,
int aHigherIndex,
Double anAngle)
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).
rotateRight in interface PhysicalStore<Double>PhysicalStore.rotateLeft(int, int, Number)
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(MatrixStore<Double> aBody,
boolean assumeOne)
public void substituteForwards(MatrixStore<Double> aBody,
boolean assumeOne)
public void subtract(Double aNmbr)
subtract in interface PhysicalStore<Double>public void subtract(PhysicalStore<Double> aStore)
subtract in interface PhysicalStore<Double>public List<Double> toList()
toList in interface PhysicalStore<Double>public PhysicalStore<Double> toPhysicalStore()
MatrixStorePhysicalStore instances are mutable.
If you plan to modify it you should make a copy first. Depending on what
you do with the PhysicalStore you may
have to unshade it.
toPhysicalStore in interface MatrixStore<Double>PhysicalStore representation
of this MatrixStore.PhysicalStore.copy(),
PhysicalStore.unshade()public double[][] toRawCopy()
toRawCopy in interface PhysicalStore<Double>
public Scalar<Double> toScalar(int aRow,
int aCol)
toScalar in interface MatrixStore<Double>public void unshade()
PhysicalStore
unshade in interface PhysicalStore<Double>PhysicalStore.shadeLowerLeft(),
PhysicalStore.shadeUpperRight()public final int size()
public final String toString()
toString in class Objectpublic final Array1Dim<N> toUtility1Dim()
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 Array2Dim<N> toUtility2Dim()
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 ArrayAnyDim<N> toUtilityAnyDim()
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.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||