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

All Superinterfaces:
Access1D<N>, Access2D<N>
All Known Subinterfaces:
DecompositionStore<N>, PhysicalStore<N>
All Known Implementing Classes:
AboveBelowStore, BigDenseStore, ColumnsStore, ComplexDenseStore, ConjugatedStore, IdentityStore, JamaMatrix, LeftRightStore, LowerHessenbergStore, LowerTriangularStore, PrimitiveDenseStore, RowsStore, SingleStore, SuperimposedStore, TransposedStore, UpperHessenbergStore, UpperTriangularStore, WrapperStore, ZeroStore

public interface MatrixStore<N extends Number>
extends Access2D<N>, Access1D<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(Aggregator 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 anInd)
           
 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 anInd)
           
 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 isLowerLeftShaded()
          The entries below (left of) the first subdiagonal are zero - effectively an upper Hessenberg matrix.
 boolean isPositive(int aRow, int aCol)
           
 boolean isReal(int aRow, int aCol)
           
 boolean isUpperRightShaded()
          The entries above (right of) the first superdiagonal are zero - effectively 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)
           
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

aggregateAll

N aggregateAll(Aggregator 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()

isLowerLeftShaded

boolean isLowerLeftShaded()
The entries below (left of) the first subdiagonal are zero - effectively an upper Hessenberg matrix.

See Also:
isUpperRightShaded()

isPositive

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

isReal

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

isUpperRightShaded

boolean isUpperRightShaded()
The entries above (right of) the first superdiagonal are zero - effectively a lower Hessenberg matrix.

See Also:
isLowerLeftShaded()

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

doubleValue

double doubleValue(int anInd)

get

N get(int anInd)