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

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

public final class SelectedColumnsStore<N extends Number>
extends Object

A selection (re-ordering) of columns.

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
SelectedColumnsStore(MatrixStore<N> aBase, int... someColumns)
           
 
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 aRow, int aCol)
          Extracts one element of this matrix as a double.
 boolean equals(MatrixStore<N> aStore, NumberContext aCntxt)
           
 boolean equals(Object someObj)
           
 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
 int hashCode()
           
 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)
           
 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

SelectedColumnsStore

public SelectedColumnsStore(MatrixStore<N> aBase,
                            int... someColumns)
Method Detail

doubleValue

public 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
See Also:
Primitive2D.doubleValue(int, int)

get

public N get(int aRow,
             int aCol)

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(Aggregator 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()
The size of this structure in the column-direction/dimension

Returns:
The number of columns

getMinDim

public int getMinDim()
Specified by:
getMinDim in interface MatrixStore<N extends Number>

getRowDim

public final int getRowDim()
The size of this structure in the row-direction/dimension

Returns:
The number of rows

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

isReal

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

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)

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)

size

public int size()
Returns:
The total number of elements contained in this structure

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>