org.ojalgo.matrix.store
Class SelectedRowsStore<N extends Number>

java.lang.Object
  extended by org.ojalgo.matrix.store.SelectedRowsStore<N>
All Implemented Interfaces:
Serializable, Access2D<N>, MatrixStore<N>

public final class SelectedRowsStore<N extends Number>
extends Object

A selection (re-ordering) of rows.

Author:
apete
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.ojalgo.matrix.store.MatrixStore
MatrixStore.Builder<N extends Number>
 
Constructor Summary
SelectedRowsStore(MatrixStore<N> aBase, int... someRows)
           
 
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)
           
 boolean equals(MatrixStore<N> aStore, NumberContext aCntxt)
           
 boolean equals(Object someObj)
           
 N get(int aRow, int aCol)
           
 int getColDim()
           
 PhysicalStore.Factory<N> getFactory()
           
 int getMinDim()
           
 N getNumber(int aRow, int aCol)
          Deprecated. Use get(int,int) instead
 int getRowDim()
           
 int hashCode()
           
 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()
           
 double[][] toRawCopy()
           
 Scalar<N> toScalar(int aRow, int aCol)
           
 String toString()
           
 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 class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SelectedRowsStore

public SelectedRowsStore(MatrixStore<N> aBase,
                         int... someRows)
Method Detail

doubleValue

public double doubleValue(int aRow,
                          int aCol)
See Also:
Access2D.doubleValue(int, int)

getNumber

public N getNumber(int aRow,
                   int aCol)
Deprecated. Use get(int,int) instead


get

public N get(int aRow,
             int aCol)

multiplyRight

public MatrixStore<N> multiplyRight(MatrixStore<N> aStore)
Specified by:
multiplyRight in interface MatrixStore<N extends Number>
See Also:
MatrixStore.multiplyRight(org.ojalgo.matrix.store.MatrixStore)

toScalar

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

getFactory

public final PhysicalStore.Factory<N> getFactory()

toString

public final String toString()
Overrides:
toString in class Object

aggregateAll

public N aggregateAll(ChainableAggregator aVisitor)
Specified by:
aggregateAll in interface MatrixStore<N extends Number>

aggregateAll

public N aggregateAll(CollectableAggregator aVisitor)
Specified by:
aggregateAll in interface MatrixStore<N extends Number>

builder

public final MatrixStore.Builder<N> builder()
Specified by:
builder in interface MatrixStore<N extends Number>

conjugate

public PhysicalStore<N> conjugate()
Description copied from interface: MatrixStore
Each call must produce a new instance.

Specified by:
conjugate in interface MatrixStore<N extends Number>
Returns:
A new conjugated PhysicalStore copy.

copy

public PhysicalStore<N> copy()
Description copied from interface: MatrixStore
Each call must produce a new instance.

Specified by:
copy in interface MatrixStore<N extends Number>
Returns:
A new PhysicalStore copy.

equals

public final boolean equals(MatrixStore<N> aStore,
                            NumberContext aCntxt)
Specified by:
equals in interface MatrixStore<N extends Number>

equals

public final boolean equals(Object someObj)
Overrides:
equals in class Object

getColDim

public final int getColDim()

getMinDim

public int getMinDim()

getRowDim

public final int getRowDim()

hashCode

public final int hashCode()
Overrides:
hashCode in class Object

isAbsolute

public boolean isAbsolute(int aRow,
                          int aCol)
Specified by:
isAbsolute in interface MatrixStore<N extends Number>
See Also:
Scalar.isAbsolute()

isLowerLeftShaded

public final boolean isLowerLeftShaded()
Description copied from interface: MatrixStore

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

Specified by:
isLowerLeftShaded in interface MatrixStore<N extends Number>
See Also:
MatrixStore.isUpperRightShaded(), MatrixStore.isShaded(), PhysicalStore.shadeLowerLeft(), PhysicalStore.unshade()

isReal

public boolean isReal(int aRow,
                      int aCol)
Specified by:
isReal in interface MatrixStore<N extends Number>
See Also:
Scalar.isReal()

isShaded

public final boolean isShaded()
Description copied from interface: MatrixStore

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.

Specified by:
isShaded in interface MatrixStore<N extends Number>
See Also:
MatrixStore.isLowerLeftShaded(), MatrixStore.isUpperRightShaded(), PhysicalStore.unshade()

isUpperRightShaded

public final boolean isUpperRightShaded()
Description copied from interface: MatrixStore

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

Specified by:
isUpperRightShaded in interface MatrixStore<N extends Number>
See Also:
MatrixStore.isLowerLeftShaded(), MatrixStore.isShaded(), PhysicalStore.shadeUpperRight(), PhysicalStore.unshade()

isZero

public boolean isZero(int aRow,
                      int aCol)
Specified by:
isZero in interface MatrixStore<N extends Number>
See Also:
Scalar.isZero()

multiplyLeft

public MatrixStore<N> multiplyLeft(MatrixStore<N> aStore)
Specified by:
multiplyLeft in interface MatrixStore<N extends Number>
See Also:
MatrixStore.multiplyLeft(org.ojalgo.matrix.store.MatrixStore)

size

public int size()

toRawCopy

public double[][] toRawCopy()
Specified by:
toRawCopy in interface MatrixStore<N extends Number>

transpose

public PhysicalStore<N> transpose()
Description copied from interface: MatrixStore
Each call must produce a new instance.

Specified by:
transpose in interface MatrixStore<N extends Number>
Returns:
A new transposed PhysicalStore copy.

visitAll

public void visitAll(AggregatorFunction<N> aVisitor)
Specified by:
visitAll in interface MatrixStore<N extends Number>

visitColumn

public void visitColumn(int aRow,
                        int aCol,
                        AggregatorFunction<N> aVisitor)
Specified by:
visitColumn in interface MatrixStore<N extends Number>

visitDiagonal

public void visitDiagonal(int aRow,
                          int aCol,
                          AggregatorFunction<N> aVisitor)
Specified by:
visitDiagonal in interface MatrixStore<N extends Number>

visitRow

public void visitRow(int aRow,
                     int aCol,
                     AggregatorFunction<N> aVisitor)
Specified by:
visitRow in interface MatrixStore<N extends Number>