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

All Superinterfaces:
Access2D<N>, MatrixStore<N>
All Known Subinterfaces:
DecompositionStore<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
 double doubleValue(int aRow, int aCol)
          Extracts one element of this matrix as a double.
 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)
          Deprecated. v29
 Householder<N> generateHouseholderRow(int newIj, int newI)
          Deprecated. v29
 N get(int aRow, int aCol)
           
 int getColDim()
          The size of this structure in the column-direction/dimension
 int getIndexOfLargestInColumn(int aRow, int aCol)
           
 int getIndexOfLargestInRow(int aRow, int aCol)
           
 int getRowDim()
          The size of this structure in the row-direction/dimension
 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)
           
 int size()
           
 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, int aFirstRow)
           
 void transformRight(Rotation<N> aTransf)
           As in MatrixStore.multiplyRight(MatrixStore) where the right/parameter matrix is a plane rotation.
 
Methods inherited from interface org.ojalgo.matrix.store.MatrixStore
aggregateAll, aggregateAll, builder, conjugate, copy, equals, getFactory, getMinDim, isAbsolute, isReal, isZero, multiplyLeft, multiplyRight, toScalar, transpose, visitAll, visitColumn, visitDiagonal, visitRow
 

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

@Deprecated
Householder<N> generateHouseholderColumn(int newI,
                                                    int newIj)
Deprecated. v29


generateHouseholderRow

@Deprecated
Householder<N> generateHouseholderRow(int newIj,
                                                 int newI)
Deprecated. v29


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)

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

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)

doubleValue

double doubleValue(int aRow,
                   int aCol)
Extracts one element of this matrix as a double.

Parameters:
aRow - A row index.
aCol - A column index.
Returns:
One matrix element

get

N get(int aRow,
      int aCol)

getColDim

int getColDim()
The size of this structure in the column-direction/dimension

Returns:
The number of columns

getRowDim

int getRowDim()
The size of this structure in the row-direction/dimension

Returns:
The number of rows

size

int size()
Returns:
The total number of elements contained in this structure