org.ojalgo.matrix.store
Interface PhysicalStore<N extends Number>

All Superinterfaces:
MatrixStore<N>
All Known Implementing Classes:
BigDenseStore, ComplexDenseStore, JamaMatrix, PrimitiveDenseStore

public interface PhysicalStore<N extends Number>
extends MatrixStore<N>

PhysicalStore:s, as opposed to MatrixStore:s, are mutable. The vast majorty of the methods return void and the only method to return a PhysicalStore (or MatrixStore) is copy().

This interface and its implementations are central to ojAlgo.

Author:
apete

Method Summary
 void add(N aNmbr)
           
 void add(PhysicalStore<N> aStore)
           
 N calculateColumnNorm(int aRow, int aCol, int aDegree)
           
 N calculateRowNorm(int aRow, int aCol, int aDegree)
           
 N calculateTrace()
           
 N calculateVectorNorm(int aDegree)
           
 N calculateVectorProduct(PhysicalStore<N> aStore)
           
 PhysicalStore<N> copy()
          Each call must produce a new instance.
 N countNonZeroElements()
           
 void divide(N aNmbr)
           
 void divideElements(PhysicalStore<N> aStore)
           
 void enforceAll(NumberContext aContext)
          Deprecated. Since Version 25. Use something else.
 boolean equals(PhysicalStore<N> aStore, NumberContext aCntxt)
           
 void exchangeRows(int aRowA, int aRowB)
           
 void fillAll(N aNmbr)
           
 N getLargestElement()
           
 boolean isAbsolute(int aRow, int aCol)
           
 boolean isZero(int aRow, int aCol)
           
 void multiply(N aNmbr)
           
 void multiplyElements(PhysicalStore<N> aStore)
           
 void multiplyLeft(Rotation<N> aRotation)
           
 void multiplyRight(Rotation<N> aRotation)
           
 void negateAll()
           
 void rotateLeft(int aLowerIndex, int aHigherIndex, N anAngle)
           As in MatrixStore.multiplyLeft(MatrixStore) where the left/parameter matrix is a plane rotation.
 void rotateRight(int aLowerIndex, int aHigherIndex, N 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, N 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.
 void subtract(N aNmbr)
           
 void subtract(PhysicalStore<N> aStore)
           
 List<N> toList()
           
 double[][] toRawCopy()
           
 void unshade()
          Unshades both the lower (left) and upper (right) triangles.
 void visitAll(AggregatorFunction<N> aVisitor)
          Deprecated. Since Version 25. Use something else.
 
Methods inherited from interface org.ojalgo.matrix.store.MatrixStore
doubleValue, getColDim, getMinDim, getNumber, getPhysicalFactory, getRowDim, isLowerLeftShaded, isShaded, isUpperRightShaded, multiplyBothSides, multiplyLeft, multiplyRight, toPhysicalStore, toScalar
 

Method Detail

add

void add(N aNmbr)

add

void add(PhysicalStore<N> aStore)

calculateColumnNorm

N calculateColumnNorm(int aRow,
                      int aCol,
                      int aDegree)

calculateRowNorm

N calculateRowNorm(int aRow,
                   int aCol,
                   int aDegree)

calculateTrace

N calculateTrace()

calculateVectorNorm

N calculateVectorNorm(int aDegree)

calculateVectorProduct

N calculateVectorProduct(PhysicalStore<N> aStore)

copy

PhysicalStore<N> copy()
Each call must produce a new instance.

Returns:
A new PhysicalStore copy.

countNonZeroElements

N countNonZeroElements()

divide

void divide(N aNmbr)

divideElements

void divideElements(PhysicalStore<N> aStore)

enforceAll

@Deprecated
void enforceAll(NumberContext aContext)
Deprecated. Since Version 25. Use something else.


equals

boolean equals(PhysicalStore<N> aStore,
               NumberContext aCntxt)

exchangeRows

void exchangeRows(int aRowA,
                  int aRowB)

fillAll

void fillAll(N aNmbr)

getLargestElement

N getLargestElement()

isAbsolute

boolean isAbsolute(int aRow,
                   int aCol)

isZero

boolean isZero(int aRow,
               int aCol)

multiply

void multiply(N aNmbr)

multiplyElements

void multiplyElements(PhysicalStore<N> aStore)

multiplyLeft

void multiplyLeft(Rotation<N> aRotation)

multiplyRight

void multiplyRight(Rotation<N> aRotation)

negateAll

void negateAll()

rotateLeft

void rotateLeft(int aLowerIndex,
                int aHigherIndex,
                N anAngle)

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.

See Also:
rotateRight(int, int, Number)

rotateRight

void rotateRight(int aLowerIndex,
                 int aHigherIndex,
                 N anAngle)

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).

See Also:
rotateLeft(int, int, Number)

set

void set(int aRow,
         int aCol,
         double aNmbr)

set

void set(int aRow,
         int aCol,
         N aNmbr)

shadeLowerLeft

void shadeLowerLeft()

Shades the lower (left) triangle, leaving an upper Hessenberg matrix.

See Also:
unshade()

shadeUpperRight

void shadeUpperRight()

Shades the upper (right) triangle, leaving a lower Hessenberg matrix.

See Also:
unshade()

subtract

void subtract(N aNmbr)

subtract

void subtract(PhysicalStore<N> aStore)

toList

List<N> toList()

toRawCopy

double[][] toRawCopy()

unshade

void unshade()
Unshades both the lower (left) and upper (right) triangles.

See Also:
shadeLowerLeft(), shadeUpperRight()

visitAll

@Deprecated
void visitAll(AggregatorFunction<N> aVisitor)
Deprecated. Since Version 25. Use something else.