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

All Known Subinterfaces:
CholeskyDecomposition.CholeskyStore<N>, LUDecomposition.LUStore<N>, PhysicalStore<N>, QRDecomposition.QRStore<N>
All Known Implementing Classes:
BigDenseStore, ComplexDenseStore, ConjugatedStore, IdentityStore, JamaMatrix, MergedColumnsStore, MergedRowsStore, PrimitiveDenseStore, RawStore, SelectedColumnsStore, SelectedRowsStore, SingleElementStore, SuperimposedColumnStore, SuperimposedDiagonalStore, SuperimposedElementStore, SuperimposedMatrixStore, SuperimposedRowStore, TransposedStore, ZeroStore

public interface MatrixStore<N extends Number>

A MatrixStore is a matrix (two-dimensional) store of numbers/scalars.

This interface does not define methods that require any implementation to alter the matrix. Either the methods return matrix elements, some meta data or produce new instances.

The method copy() returns a PhysicalStore which extends MatrixSore and defines additional methods. A PhysicalStore is mutable.

Author:
apete

Method Summary
 PhysicalStore<N> conjugate()
          Each call must produce a new instance.
 PhysicalStore<N> copy()
          Each call must produce a new instance.
 double doubleValue(int aRow, int aCol)
           
 boolean equals(MatrixStore<N> aStore, NumberContext aCntxt)
           
 int getColDim()
           
 PhysicalStore.Factory<N> getFactory()
           
 int getMinDim()
           
 N getNumber(int aRow, int aCol)
           
 int getRowDim()
           
 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)
           
 MatrixStore<N> multiplyLeft(MatrixStore<N> aStore)
           
 MatrixStore<N> multiplyRight(MatrixStore<N> aStore)
           
 int size()
           
 Scalar<N> toScalar(int aRow, int aCol)
           
 PhysicalStore<N> transpose()
          Each call must produce a new instance.
 void visitAll(AggregatorFunction<N> aVisitor)
           
 void visitColumn(int aRow, int aCol, AggregatorFunction<N> aVisitor)
           
 void visitDiagonal(int aRow, int aCol, AggregatorFunction<N> aVisitor)
           
 void visitRow(int aRow, int aCol, AggregatorFunction<N> aVisitor)
           
 

Method Detail

conjugate

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

Returns:
A new conjugated PhysicalStore copy.

copy

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

Returns:
A new PhysicalStore copy.

doubleValue

double doubleValue(int aRow,
                   int aCol)

equals

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

getColDim

int getColDim()

getFactory

PhysicalStore.Factory<N> getFactory()

getMinDim

int getMinDim()

getNumber

N getNumber(int aRow,
            int aCol)

getRowDim

int getRowDim()

isAbsolute

boolean isAbsolute(int aRow,
                   int aCol)

isLowerLeftShaded

boolean isLowerLeftShaded()

The lower (left) triangle is shaded leaving an upper Hessenberg matrix.

See Also:
isUpperRightShaded(), isShaded(), PhysicalStore.shadeLowerLeft(), PhysicalStore.unshade()

isReal

boolean isReal(int aRow,
               int aCol)

isShaded

boolean isShaded()

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

See Also:
isLowerLeftShaded(), isUpperRightShaded(), PhysicalStore.unshade()

isUpperRightShaded

boolean isUpperRightShaded()

The upper (right) triangle is shaded leaving a lower Hessenberg matrix.

See Also:
isLowerLeftShaded(), isShaded(), PhysicalStore.shadeUpperRight(), PhysicalStore.unshade()

isZero

boolean isZero(int aRow,
               int aCol)

multiplyLeft

MatrixStore<N> multiplyLeft(MatrixStore<N> aStore)

multiplyRight

MatrixStore<N> multiplyRight(MatrixStore<N> aStore)

size

int size()

toScalar

Scalar<N> toScalar(int aRow,
                   int aCol)

transpose

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

Returns:
A new transposed PhysicalStore copy.

visitAll

void visitAll(AggregatorFunction<N> aVisitor)

visitColumn

void visitColumn(int aRow,
                 int aCol,
                 AggregatorFunction<N> aVisitor)

visitDiagonal

void visitDiagonal(int aRow,
                   int aCol,
                   AggregatorFunction<N> aVisitor)

visitRow

void visitRow(int aRow,
              int aCol,
              AggregatorFunction<N> aVisitor)