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

All Superinterfaces:
Access2D<N>
All Known Subinterfaces:
CholeskyDecomposition.Store<N>, LUDecomposition.Store<N>, PhysicalStore<N>, QRDecomposition.Store<N>
All Known Implementing Classes:
BigDenseStore, ComplexDenseStore, ConjugatedStore, IdentityStore, JamaMatrix, LowerTriangularStore, MergedColumnsStore, MergedRowsStore, PrimitiveDenseStore, SelectedColumnsStore, SelectedRowsStore, SingleStore, SuperimposedStore, TransposedStore, UpperTriangularStore, ZeroStore

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

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

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

The methods conjugate(), copy() and transpose() return PhysicalStore instances. PhysicalStore extends MatrixStore. It defines additional methods, and is mutable.

Author:
apete

Nested Class Summary
static class MatrixStore.Builder<N extends Number>
           
 
Method Summary
 N aggregateAll(ChainableAggregator aVisitor)
           
 N aggregateAll(CollectableAggregator aVisitor)
           
 MatrixStore.Builder<N> builder()
           
 PhysicalStore<N> conjugate()
          Each call must produce a new instance.
 PhysicalStore<N> copy()
          Each call must produce a new instance.
 boolean equals(MatrixStore<N> aStore, NumberContext aCntxt)
           
 int getColDim()
           
 PhysicalStore.Factory<N> getFactory()
           
 int getMinDim()
           
 int getRowDim()
           
 boolean isAbsolute(int aRow, int aCol)
           
 boolean isLowerLeftShaded()
          Deprecated. v29 This feature will be removed
 boolean isReal(int aRow, int aCol)
           
 boolean isShaded()
          Deprecated. v29 This feature will be removed
 boolean isUpperRightShaded()
          Deprecated. v29 This feature will be removed
 boolean isZero(int aRow, int aCol)
           
 MatrixStore<N> multiplyLeft(MatrixStore<N> aStore)
           
 MatrixStore<N> multiplyRight(MatrixStore<N> aStore)
           
 int size()
           
 double[][] toRawCopy()
           
 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)
           
 
Methods inherited from interface org.ojalgo.access.Access2D
doubleValue, get, toScalar
 

Method Detail

aggregateAll

N aggregateAll(ChainableAggregator aVisitor)

aggregateAll

N aggregateAll(CollectableAggregator aVisitor)

builder

MatrixStore.Builder<N> builder()

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.

equals

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

getFactory

PhysicalStore.Factory<N> getFactory()

isAbsolute

boolean isAbsolute(int aRow,
                   int aCol)
See Also:
Scalar.isAbsolute()

isLowerLeftShaded

@Deprecated
boolean isLowerLeftShaded()
Deprecated. v29 This feature will be removed

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)
See Also:
Scalar.isReal()

isShaded

@Deprecated
boolean isShaded()
Deprecated. v29 This feature will be removed

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

@Deprecated
boolean isUpperRightShaded()
Deprecated. v29 This feature will be removed

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)
See Also:
Scalar.isZero()

multiplyLeft

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

multiplyRight

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

toRawCopy

double[][] toRawCopy()

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)

getColDim

int getColDim()

getMinDim

int getMinDim()

getRowDim

int getRowDim()

size

int size()