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

All Superinterfaces:
Access2D<N>
All Known Subinterfaces:
DecompositionStore<N>, PhysicalStore<N>
All Known Implementing Classes:
BigDenseStore, ComplexDenseStore, ConjugatedStore, IdentityStore, JamaMatrix, LowerHessenbergStore, LowerTriangularStore, MergedColumnsStore, MergedRowsStore, PrimitiveDenseStore, SelectedColumnsStore, SelectedRowsStore, SingleStore, SuperimposedStore, TransposedStore, UpperHessenbergStore, UpperTriangularStore, WrapperStore, 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.
 double doubleValue(int aRow, int aCol)
          Extracts one element of this matrix as a double.
 boolean equals(MatrixStore<N> aStore, NumberContext aCntxt)
           
 N get(int aRow, int aCol)
           
 int getColDim()
          The size of this structure in the column-direction/dimension
 PhysicalStore.Factory<N> getFactory()
           
 int getMinDim()
           
 int getRowDim()
          The size of this structure in the row-direction/dimension
 boolean isAbsolute(int aRow, int aCol)
           
 boolean isReal(int aRow, int aCol)
           
 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

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

getMinDim

int getMinDim()

isAbsolute

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

isReal

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

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)

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)

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