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.Sortable
Nested 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()
long
count()
count() == countRows() * countColumns()long
Only need to implement if the structure may contain more than Integer.MAX_VALUE elements.long
Only need to implement if the structure may contain more than Integer.MAX_VALUE elements.int
int
(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, 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 Details
-
myDelegate
-
mySafe
private boolean mySafe
-
-
Constructor Details
-
SparseMutator2D
SparseMutator2D(SparseStore.Builder<N> delegate)
-
-
Method Details
-
build
- Specified by:
build
in interfaceFactory2D.Builder<N extends 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(int row, int col, double value) -
set
public void set(long index, double value) -
set
-
size
public int size()Description copied from interface:Structure2D
size() == getRowDim() * getColDim()- Specified by:
size
in interfaceStructure1D
- Specified by:
size
in interfaceStructure2D
-
instantiate
-