Class Primitive2D.Simple
java.lang.Object
org.ojalgo.structure.Primitive2D
org.ojalgo.structure.Primitive2D.Simple
- All Implemented Interfaces:
Access1D<Double>, Access2D<Double>, Mutate1D, Mutate2D, Structure1D, Structure2D
- Enclosing class:
Primitive2D
-
Nested Class Summary
Nested classes/interfaces inherited from class Primitive2D
Primitive2D.Simple, Primitive2D.WrapperNested classes/interfaces inherited from interface Access2D
Access2D.Aggregatable<N>, Access2D.Collectable<N,R>, Access2D.ColumnView<N>, Access2D.ElementView<N>, Access2D.RowView<N>, Access2D.SelectionView<N>, Access2D.Sliceable<N>, Access2D.Visitable<N> Nested classes/interfaces inherited from interface Mutate1D
Mutate1D.SortableNested classes/interfaces inherited from interface Mutate2D
Mutate2D.Exchangeable, Mutate2D.Fillable<N>, Mutate2D.Mixable<N>, Mutate2D.Modifiable<N>, Mutate2D.ModifiableReceiver<N>, Mutate2D.Receiver<N>Nested classes/interfaces inherited from interface Structure1D
Structure1D.BasicMapper<T>, Structure1D.IndexMapper<T>, Structure1D.IntIndex, Structure1D.Logical<S,B>, Structure1D.LongIndex, Structure1D.LoopCallback Nested classes/interfaces inherited from interface Structure2D
Structure2D.IntRowColumn, Structure2D.Logical<S,B>, Structure2D.LongRowColumn, Structure2D.ReducibleTo1D<R>, Structure2D.Reshapable, Structure2D.RowColumnKey<R, C>, Structure2D.RowColumnMapper<R, C> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final intprivate final double[]Fields inherited from class Primitive2D
EMPTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubledoubleValue(int row, int col) Extracts one element of this matrix as a double.intintvoidset(int row, int col, double value) intsize()size() == getRowDim() * getColDim()Methods inherited from class Primitive2D
get, newInstance, set, toString, wrapMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Access1D
asCollectable1D, asKeyed1D, asList, axpy, dot, select, supplyTo, toList, toRawCopy1DMethods inherited from interface Access2D
asCollectable2D, asKeyed2D, byteValue, byteValue, byteValue, byteValue, columns, columns, columns, doubleValue, doubleValue, doubleValue, elements, floatValue, floatValue, floatValue, floatValue, get, intValue, intValue, intValue, intValue, longValue, longValue, longValue, longValue, nonzeros, rows, rows, rows, select, select, shortValue, shortValue, shortValue, shortValue, toRawCopy2DMethods inherited from interface Mutate2D
set, 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 Structure2D
count, countColumns, countRows, firstInColumn, firstInRow, getMaxDim, getMinDim, isEmpty, isFat, isScalar, isSquare, isTall, isVector, limitOfColumn, limitOfRow
-
Field Details
-
myColDim
private final int myColDim -
myRowDim
private final int myRowDim -
myValues
private final double[] myValues
-
-
Constructor Details
-
Simple
Simple(int nbRows, int nbCols)
-
-
Method Details
-
doubleValue
public double doubleValue(int row, int col) Description copied from interface:Access2DExtracts one element of this matrix as a double.- Parameters:
row- A row index.col- A column index.- Returns:
- One matrix element
-
getColDim
public int getColDim()- Returns:
- The number of columns
-
getRowDim
public int getRowDim()- Returns:
- The number of rows
-
set
public void set(int row, int col, double value) -
size
public int size()Description copied from interface:Structure2Dsize() == getRowDim() * getColDim()
-