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

All Superinterfaces:
Access2D<N>, MatrixStore<N>
All Known Subinterfaces:
CholeskyDecomposition.Store<N>, LUDecomposition.Store<N>, QRDecomposition.Store<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 defined here return void and none return PhysicalStore or MatrixStore.

This interface and its implementations are central to ojAlgo.

Author:
apete

Nested Class Summary
static interface PhysicalStore.Factory<N extends Number>
           
 
Nested classes/interfaces inherited from interface org.ojalgo.matrix.store.MatrixStore
MatrixStore.Builder<N extends Number>
 
Method Summary
 List<N> asList()
           
 void caxpy(N aSclrA, int aColX, int aColY, int aFirstRow)
           column a * x plus y
 void exchangeColumns(int aColA, int aColB)
           
 void exchangeRows(int aRowA, int aRowB)
           
 void fillAll(N aNmbr)
           
 void fillByMultiplying(MatrixStore<N> aLeftArg, MatrixStore<N> aRightArg)
           
 void fillColumn(int aRow, int aCol, N aNmbr)
           
 void fillDiagonal(int aRow, int aCol, N aNmbr)
           
 void fillMatching(Access2D<N> aSource2D)
           
 void fillMatching(MatrixStore<N> aLeftArg, BinaryFunction<N> aFunc, MatrixStore<N> aRightArg)
           Will replace the elements of [this] with the results of element wise invocation of the input binary funtion:
 void fillMatching(MatrixStore<N> aLeftArg, BinaryFunction<N> aFunc, N aRightArg)
           Will replace the elements of [this] with the results of element wise invocation of the input binary funtion:
 void fillMatching(N aLeftArg, BinaryFunction<N> aFunc, MatrixStore<N> 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, N aNmbr)
           
 Householder<N> generateHouseholderColumn(int newI, int newIj)
           
 Householder<N> generateHouseholderRow(int newIj, int newI)
           
 int getColDim()
           
 int getIndexOfLargestInColumn(int aRow, int aCol)
           
 int getIndexOfLargestInRow(int aRow, int aCol)
           
 int getMinDim()
           
 int getRowDim()
           
 void maxpy(N aSclrA, MatrixStore<N> aMtrxX)
           matrix a * x plus y
 void modifyAll(UnaryFunction<N> aFunc)
           
 void modifyColumn(int aRow, int aCol, UnaryFunction<N> aFunc)
           
 void modifyDiagonal(int aRow, int aCol, UnaryFunction<N> aFunc)
           
 void modifyRow(int aRow, int aCol, UnaryFunction<N> aFunc)
           
 void raxpy(N 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, N aNmbr)
           
 void shadeLowerLeft()
          Deprecated. v29 This feature will be removed
 void shadeUpperRight()
          Deprecated. v29 This feature will be removed
 int size()
           
 void substituteBackwards(Access2D<N> 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<N> aBody, boolean assumeOne)
          Deprecated. v29 Use substituteBackwards(Access2D,boolean,boolean) instead
 void substituteForwards(Access2D<N> 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<N> aBody, boolean assumeOne)
          Deprecated. v29 Use substituteForwards(Access2D,boolean,boolean) instead
 void transformLeft(Householder<N> aTransf)
          Deprecated. v29 Use transformLeft(Householder, int) instead.
 void transformLeft(Householder<N> aTransf, int aFirstCol)
           
 void transformLeft(Rotation<N> aTransf)
           As in MatrixStore.multiplyLeft(MatrixStore) where the left/parameter matrix is a plane rotation.
 void transformRight(Householder<N> aTransf)
          Deprecated. v29 Use transformRight(Householder, int) instead.
 void transformRight(Householder<N> aTransf, int aFirstRow)
           
 void transformRight(Rotation<N> aTransf)
           As in MatrixStore.multiplyRight(MatrixStore) where the right/parameter matrix is a plane rotation.
 void unshade()
          Deprecated. v29 This feature will be removed
 
Methods inherited from interface org.ojalgo.matrix.store.MatrixStore
aggregateAll, aggregateAll, builder, conjugate, copy, equals, getFactory, isAbsolute, isLowerLeftShaded, isReal, isShaded, isUpperRightShaded, isZero, multiplyLeft, multiplyRight, toRawCopy, transpose, visitAll, visitColumn, visitDiagonal, visitRow
 
Methods inherited from interface org.ojalgo.access.Access2D
doubleValue, get, toScalar
 

Method Detail

asList

List<N> asList()
Returns:
The elements of the physical store as a fixed size (1 dimensional) list. The elements may be accessed either row or colomn major.

caxpy

void caxpy(N aSclrA,
           int aColX,
           int aColY,
           int aFirstRow)

column a * x plus y

[this(*,aColY)] = aSclrA [this(*,aColX)] + [this(*,aColY)]


exchangeColumns

void exchangeColumns(int aColA,
                     int aColB)

exchangeRows

void exchangeRows(int aRowA,
                  int aRowB)

fillAll

void fillAll(N aNmbr)

fillByMultiplying

void fillByMultiplying(MatrixStore<N> aLeftArg,
                       MatrixStore<N> aRightArg)

fillColumn

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

fillDiagonal

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

fillMatching

void fillMatching(Access2D<N> aSource2D)

fillMatching

void fillMatching(MatrixStore<N> aLeftArg,
                  BinaryFunction<N> aFunc,
                  MatrixStore<N> aRightArg)

Will 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

void fillMatching(MatrixStore<N> aLeftArg,
                  BinaryFunction<N> aFunc,
                  N aRightArg)

Will 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

void fillMatching(N aLeftArg,
                  BinaryFunction<N> aFunc,
                  MatrixStore<N> aRightArg)

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


fillRow

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

generateHouseholderColumn

Householder<N> generateHouseholderColumn(int newI,
                                         int newIj)

generateHouseholderRow

Householder<N> generateHouseholderRow(int newIj,
                                      int newI)

getIndexOfLargestInColumn

int getIndexOfLargestInColumn(int aRow,
                              int aCol)

getIndexOfLargestInRow

int getIndexOfLargestInRow(int aRow,
                           int aCol)

maxpy

void maxpy(N aSclrA,
           MatrixStore<N> aMtrxX)

matrix a * x plus y

[this] = aSclrA [aMtrxX] + [this]


modifyAll

void modifyAll(UnaryFunction<N> aFunc)

modifyColumn

void modifyColumn(int aRow,
                  int aCol,
                  UnaryFunction<N> aFunc)

modifyDiagonal

void modifyDiagonal(int aRow,
                    int aCol,
                    UnaryFunction<N> aFunc)

modifyRow

void modifyRow(int aRow,
               int aCol,
               UnaryFunction<N> aFunc)

raxpy

void raxpy(N aSclrA,
           int aRowX,
           int aRowY,
           int aFirstCol)

row a * x plus y

[this(aRowY,*)] = aSclrA [this(aRowX,*)] + [this(aRowY,*)]


set

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

set

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

shadeLowerLeft

@Deprecated
void shadeLowerLeft()
Deprecated. v29 This feature will be removed

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

See Also:
unshade()

shadeUpperRight

@Deprecated
void shadeUpperRight()
Deprecated. v29 This feature will be removed

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

See Also:
unshade()

substituteBackwards

void substituteBackwards(Access2D<N> aBody,
                         boolean assumeOne,
                         boolean transposed)
Will solve the equation system [A][X]=[B] where:

Parameters:
aBody - The equation system body parameters [A]
assumeOne - true if aBody as ones on the diagonal
transposed - true if the upper/right part of aBody is actually stored in the lower/left part of the matrix.

substituteBackwards

@Deprecated
void substituteBackwards(MatrixStore<N> aBody,
                                    boolean assumeOne)
Deprecated. v29 Use substituteBackwards(Access2D,boolean,boolean) instead


substituteForwards

void substituteForwards(Access2D<N> aBody,
                        boolean assumeOne,
                        boolean transposed)
Will solve the equation system [A][X]=[B] where:

Parameters:
aBody - The equation system body parameters [A]
assumeOne - true if aBody as ones on the diagonal
transposed - true if the lower/left part of aBody is actually stored in the upper/right part of the matrix.

substituteForwards

@Deprecated
void substituteForwards(MatrixStore<N> aBody,
                                   boolean assumeOne)
Deprecated. v29 Use substituteForwards(Access2D,boolean,boolean) instead


transformLeft

@Deprecated
void transformLeft(Householder<N> aTransf)
Deprecated. v29 Use transformLeft(Householder, int) instead.


transformLeft

void transformLeft(Householder<N> aTransf,
                   int aFirstCol)

transformLeft

void transformLeft(Rotation<N> aTransf)

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:
transformRight(Rotation)

transformRight

@Deprecated
void transformRight(Householder<N> aTransf)
Deprecated. v29 Use transformRight(Householder, int) instead.


transformRight

void transformRight(Householder<N> aTransf,
                    int aFirstRow)

transformRight

void transformRight(Rotation<N> aTransf)

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:
transformLeft(Rotation)

unshade

@Deprecated
void unshade()
Deprecated. v29 This feature will be removed

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

See Also:
shadeLowerLeft(), shadeUpperRight()

getColDim

int getColDim()

getMinDim

int getMinDim()

getRowDim

int getRowDim()

size

int size()