U
- the unitpublic interface FloatMatrixInterface<U extends Unit<U>>
Copyright (c) 2013-2018 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Modifier and Type | Method and Description |
---|---|
int |
cardinality()
Count the number of cells that have a non-zero value (ignores tolerance).
|
int |
columns()
Retrieve the number of columns of the matrix.
|
float |
determinant()
Compute the determinant of the matrix.
|
AbstractFloatScalar<U,?> |
get(int row,
int column)
Retrieve a value from the matrix.
|
float |
getInUnit(int row,
int column)
Retrieve the value stored at a specified row and column in the original unit.
|
float |
getInUnit(int row,
int column,
U targetUnit)
Retrieve the value stored at a specified row and column converted into a specified unit.
|
float |
getSI(int row,
int column)
Retrieve the value stored at a specified row and column in the standard SI unit.
|
float[][] |
getValuesInUnit()
Create a dense float[][] array filled with the values in the original unit.
|
float[][] |
getValuesInUnit(U targetUnit)
Create a dense float[][] array filled with the values converted into a specified unit.
|
float[][] |
getValuesSI()
Create a dense float[][] array filled with the values in the standard SI unit.
|
int |
rows()
Retrieve the number of rows of the matrix.
|
FloatMatrixInterface<U> |
toDense()
Create a dense version of this FloatMatrix.
|
FloatMatrixInterface<U> |
toSparse()
Create a sparse version of this FloatMatrix.
|
String |
toString() |
String |
toString(boolean verbose,
boolean withUnit)
Print this FloatMatrix with optional type and unit information.
|
String |
toString(U displayUnit)
Print this FloatMatrix with the values expressed in the specified unit.
|
String |
toString(U displayUnit,
boolean verbose,
boolean withUnit)
Print this FloatMatrix with the values expressed in the specified unit.
|
float |
zSum()
Compute the sum of all values of this matrix.
|
int rows()
int columns()
int cardinality()
AbstractFloatScalar<U,?> get(int row, int column) throws ValueException
row
- int; row of the value to retrievecolumn
- int; column of the value to retrieveValueException
- in case row or column is out of boundsfloat getSI(int row, int column) throws ValueException
row
- int; row of the value to retrievecolumn
- int; column of the value to retrieveValueException
- when row or column out of range (row < 0 or row >= rows() or column < 0 or column >=
columns())float getInUnit(int row, int column) throws ValueException
row
- int; row of the value to retrievecolumn
- int; column of the value to retrieveValueException
- when row or column out of range (row < 0 or row >= rows() or column < 0 or column >=
columns())float getInUnit(int row, int column, U targetUnit) throws ValueException
row
- int; row of the value to retrievecolumn
- int; column of the value to retrievetargetUnit
- U; the unit for the resultValueException
- when row or column out of range (row < 0 or row >= rows() or column < 0 or column >=
columns())float zSum()
float determinant() throws ValueException
ValueException
- when matrix is neither sparse, nor dense, or not squarefloat[][] getValuesSI()
float[][] getValuesInUnit()
float[][] getValuesInUnit(U targetUnit)
targetUnit
- U; the unit into which the values are converted for useString toString()
String toString(U displayUnit)
displayUnit
- U; the unit into which the values are converted for displayString toString(boolean verbose, boolean withUnit)
verbose
- boolean; if true; include type info; if false; exclude type infowithUnit
- boolean; if true; include the unit; of false; exclude the unitString toString(U displayUnit, boolean verbose, boolean withUnit)
displayUnit
- U; the unit into which the values are converted for displayverbose
- boolean; if true; include type info; if false; exclude type infowithUnit
- boolean; if true; include the unit; of false; exclude the unitFloatMatrixInterface<U> toDense()
FloatMatrixInterface<U> toSparse()
Copyright © 2015–2018 Delft University of Technology. All rights reserved.