Module ojalgo
Package org.ojalgo.matrix
Class SparseMutator2D<N extends 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 Comparable<N>,M extends BasicMatrix<N,M>>
extends Object
implements Factory2D.Builder<M>
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ojalgo.structure.Mutate1D
Mutate1D.SortableNested classes/interfaces inherited from interface org.ojalgo.structure.Mutate2D
Mutate2D.Exchangeable, Mutate2D.Fillable<N extends Comparable<N>>, Mutate2D.Mixable<N extends Comparable<N>>, Mutate2D.Modifiable<N extends Comparable<N>>, Mutate2D.ModifiableReceiver<N extends Comparable<N>>, Mutate2D.Receiver<N extends 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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()longcount()count() == countRows() * countColumns()longOnly need to implement if the structure may contain more than Integer.MAX_VALUE elements.longOnly need to implement if the structure may contain more than Integer.MAX_VALUE elements.intint(package private) abstract Minstantiate(MatrixStore<N> store) voidreset()Reset this mutable structure to some standard (all zeros) initial state.voidset(int row, int col, double value) voidset(long index, double value) voidset(long row, long col, Comparable<?> value) intsize()size() == getRowDim() * getColDim()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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, setMethods inherited from interface org.ojalgo.structure.Structure2D
firstInColumn, firstInRow, getMaxDim, getMinDim, isEmpty, isFat, isScalar, isSquare, isTall, isVector, limitOfColumn, limitOfRow
-
Field Details
-
myDelegate
-
mySafe
private boolean mySafe
-
-
Constructor Details
-
SparseMutator2D
SparseMutator2D(SparseStore.Builder<N> delegate)
-
-
Method Details
-
build
- Specified by:
buildin interfaceFactory2D.Builder<N extends Comparable<N>>
-
count
public long count()Description copied from interface:Structure2Dcount() == countRows() * countColumns()- Specified by:
countin interfaceStructure1D- Specified by:
countin interfaceStructure2D
-
countColumns
public long countColumns()Description copied from interface:Structure2DOnly need to implement if the structure may contain more than Integer.MAX_VALUE elements.- Specified by:
countColumnsin interfaceStructure2D- Returns:
- The number of columns
-
countRows
public long countRows()Description copied from interface:Structure2DOnly need to implement if the structure may contain more than Integer.MAX_VALUE elements.- Specified by:
countRowsin interfaceStructure2D- Returns:
- The number of rows
-
getColDim
public int getColDim()- Specified by:
getColDimin interfaceStructure2D- Returns:
- The number of columns
-
getRowDim
public int getRowDim()- Specified by:
getRowDimin interfaceStructure2D- Returns:
- The number of rows
-
reset
public void reset()Description copied from interface:Mutate1DReset 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(int row, int col, double value) -
set
public void set(long index, double value) -
set
-
size
public int size()Description copied from interface:Structure2Dsize() == getRowDim() * getColDim()- Specified by:
sizein interfaceStructure1D- Specified by:
sizein interfaceStructure2D
-
instantiate
-