public class DoubleMatrixDataDense extends DoubleMatrixData
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
cols, matrixSI, rows| Constructor and Description |
|---|
DoubleMatrixDataDense(double[][] matrixSI)
Create a matrix with dense data.
|
DoubleMatrixDataDense(double[] matrixSI,
int rows,
int cols)
Create a matrix with dense data.
|
| Modifier and Type | Method and Description |
|---|---|
void |
assign(DoubleFunction doubleFunction) |
DoubleMatrixDataDense |
copy() |
void |
decrementBy(DoubleMatrixData right)
Subtract a matrix from this matrix on a cell-by-cell basis.
|
void |
divideBy(DoubleMatrixData right)
Divide the values of a matrix by the values of another matrix on a cell-by-cell basis.
|
double[][] |
getDenseMatrixSI() |
double |
getSI(int row,
int col) |
void |
incrementBy(DoubleMatrixData right)
Add a matrix to this matrix on a cell-by-cell basis.
|
void |
multiplyBy(DoubleMatrixData right)
Multiply a matrix with the values of another matrix on a cell-by-cell basis.
|
void |
setSI(int row,
int col,
double valueSI)
Sets a value at the [row, col] point in the matrix.
|
DoubleMatrixDataSparse |
toSparse() |
cardinality, cols, decrementBy, divide, divideBy, equals, getStorageType, hashCode, incrementBy, instantiate, instantiate, isDense, isSparse, minus, multiplyBy, plus, rows, times, toDense, toString, zSumpublic DoubleMatrixDataDense(double[] matrixSI,
int rows,
int cols)
throws ValueException
matrixSI - double[]; the data to storerows - int; the number of rowscols - int; the number of columnsValueException - in case rows * cols != matrixSI.lengthpublic DoubleMatrixDataDense(double[][] matrixSI)
throws ValueException
matrixSI - double[][]; the data to storeValueException - in case matrix is raggedpublic final void assign(DoubleFunction doubleFunction)
doubleFunction - DoubleFunction; the function to apply on the (mutable) data elementspublic final DoubleMatrixDataSparse toSparse()
toSparse in class DoubleMatrixDatapublic final double getSI(int row,
int col)
getSI in class DoubleMatrixDatarow - int; the row number to get the value forcol - int; the column number to get the value forpublic final void setSI(int row,
int col,
double valueSI)
setSI in class DoubleMatrixDatarow - int; the row number to set the value forcol - int; the column number to set the value forvalueSI - double; the value at the indexpublic final double[][] getDenseMatrixSI()
getDenseMatrixSI in class DoubleMatrixDatapublic final DoubleMatrixDataDense copy()
copy in class DoubleMatrixDatapublic final void incrementBy(DoubleMatrixData right) throws ValueException
incrementBy in class DoubleMatrixDataright - DoubleMatrixData; the other data object to addValueException - if matrices have different lengthspublic final void decrementBy(DoubleMatrixData right) throws ValueException
decrementBy in class DoubleMatrixDataright - DoubleMatrixData; the other data object to subtractValueException - if matrices have different lengthspublic final void multiplyBy(DoubleMatrixData right) throws ValueException
multiplyBy in class DoubleMatrixDataright - DoubleMatrixData; the other data object to multiply withValueException - if matrices have different lengthspublic final void divideBy(DoubleMatrixData right) throws ValueException
divideBy in class DoubleMatrixDataright - DoubleMatrixData; the other data object to divide byValueException - if matrices have different lengthsCopyright © 2015–2019 Delft University of Technology. All rights reserved.