Package org.ojalgo.matrix
Class SparseMutator2D<N extends java.lang.Comparable<N>,M extends BasicMatrix<N,M>>
- java.lang.Object
-
- org.ojalgo.matrix.SparseMutator2D<N,M>
-
- All Implemented Interfaces:
Factory2D.Builder<M>
,Mutate1D
,Mutate2D
,Structure1D
,Structure2D
- Direct Known Subclasses:
MatrixC128.SparseReceiver
,MatrixH256.SparseReceiver
,MatrixQ128.SparseReceiver
,MatrixR032.SparseReceiver
,MatrixR064.SparseReceiver
,MatrixR128.SparseReceiver
abstract class SparseMutator2D<N extends java.lang.Comparable<N>,M extends BasicMatrix<N,M>> extends java.lang.Object implements Factory2D.Builder<M>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ojalgo.structure.Mutate1D
Mutate1D.Sortable
-
Nested classes/interfaces inherited from interface org.ojalgo.structure.Mutate2D
Mutate2D.Exchangeable, Mutate2D.Fillable<N extends java.lang.Comparable<N>>, Mutate2D.Mixable<N extends java.lang.Comparable<N>>, Mutate2D.Modifiable<N extends java.lang.Comparable<N>>, Mutate2D.ModifiableReceiver<N extends java.lang.Comparable<N>>, Mutate2D.Receiver<N extends java.lang.Comparable<N>>
-
Nested classes/interfaces inherited from interface org.ojalgo.structure.Structure1D
Structure1D.BasicMapper<T>, Structure1D.IndexMapper<T>, Structure1D.IntIndex, Structure1D.Logical<S extends Structure1D,B extends Structure1D.Logical<S,B>>, Structure1D.LongIndex, Structure1D.LoopCallback
-
Nested classes/interfaces inherited from interface org.ojalgo.structure.Structure2D
Structure2D.IntRowColumn, Structure2D.Logical<S extends Structure2D,B extends Structure2D.Logical<S,B>>, Structure2D.LongRowColumn, Structure2D.ReducibleTo1D<R extends Structure1D>, Structure2D.Reshapable, Structure2D.RowColumnKey<R,C>, Structure2D.RowColumnMapper<R,C>
-
-
Field Summary
Fields Modifier and Type Field Description private SparseStore.Builder<N>
myDelegate
private boolean
mySafe
-
Constructor Summary
Constructors Constructor Description SparseMutator2D(SparseStore.Builder<N> delegate)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description M
build()
long
count()
count() == countRows() * countColumns()long
countColumns()
Only need to implement if the structure may contain more than Integer.MAX_VALUE elements.long
countRows()
Only need to implement if the structure may contain more than Integer.MAX_VALUE elements.int
getColDim()
int
getRowDim()
(package private) abstract M
instantiate(MatrixStore<N> store)
void
reset()
Reset this mutable structure to some standard (all zeros) initial state.void
set(int row, int col, double value)
void
set(long index, double value)
void
set(long row, long col, java.lang.Comparable<?> value)
int
size()
size() == getRowDim() * getColDim()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ojalgo.structure.Mutate2D
set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set
-
Methods inherited from interface org.ojalgo.structure.Structure2D
firstInColumn, firstInRow, getMaxDim, getMinDim, isEmpty, isFat, isScalar, isSquare, isTall, isVector, limitOfColumn, limitOfRow
-
-
-
-
Field Detail
-
myDelegate
private final SparseStore.Builder<N extends java.lang.Comparable<N>> myDelegate
-
mySafe
private boolean mySafe
-
-
Constructor Detail
-
SparseMutator2D
SparseMutator2D(SparseStore.Builder<N> delegate)
-
-
Method Detail
-
build
public M build()
- Specified by:
build
in interfaceFactory2D.Builder<N extends java.lang.Comparable<N>>
-
count
public long count()
Description copied from interface:Structure2D
count() == countRows() * countColumns()- Specified by:
count
in interfaceStructure1D
- Specified by:
count
in interfaceStructure2D
-
countColumns
public long countColumns()
Description copied from interface:Structure2D
Only need to implement if the structure may contain more than Integer.MAX_VALUE elements.- Specified by:
countColumns
in interfaceStructure2D
- Returns:
- The number of columns
-
countRows
public long countRows()
Description copied from interface:Structure2D
Only need to implement if the structure may contain more than Integer.MAX_VALUE elements.- Specified by:
countRows
in interfaceStructure2D
- Returns:
- The number of rows
-
getColDim
public int getColDim()
- Specified by:
getColDim
in interfaceStructure2D
- Returns:
- The number of columns
-
getRowDim
public int getRowDim()
- Specified by:
getRowDim
in interfaceStructure2D
- Returns:
- The number of rows
-
reset
public void reset()
Description copied from interface:Mutate1D
Reset this mutable structure to some standard (all zeros) initial state. It must still be usuable after this call, and the structure/size/shape must not change.
-
set
public void set(long index, double value)
-
set
public void set(long row, long col, java.lang.Comparable<?> value)
-
size
public int size()
Description copied from interface:Structure2D
size() == getRowDim() * getColDim()- Specified by:
size
in interfaceStructure1D
- Specified by:
size
in interfaceStructure2D
-
instantiate
abstract M instantiate(MatrixStore<N> store)
-
-