public class FloatVectorDataDense extends FloatVectorData
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.
vectorSI
Constructor and Description |
---|
FloatVectorDataDense(float[] vectorSI)
Create a vector with dense data.
|
Modifier and Type | Method and Description |
---|---|
void |
assign(FloatFunction floatFunction) |
FloatVectorDataDense |
copy() |
void |
decrementBy(FloatVectorData right)
Subtract a vector from this vector on a cell-by-cell basis.
|
void |
divideBy(FloatVectorData right)
Divide the values of a vector by the values of another vector on a cell-by-cell basis.
|
float[] |
getDenseVectorSI() |
float |
getSI(int index) |
void |
incrementBy(FloatVectorData right)
Add a vector to this vector on a cell-by-cell basis.
|
void |
multiplyBy(FloatVectorData right)
Multiply a vector with the values of another vector on a cell-by-cell basis.
|
void |
setSI(int index,
float valueSI)
Sets a value at the index in the vector.
|
int |
size() |
FloatVectorDataSparse |
toSparse() |
cardinality, decrementBy, divide, divideBy, equals, getStorageType, hashCode, incrementBy, instantiate, instantiate, instantiate, instantiate, instantiateLD, instantiateMD, isDense, isSparse, minus, multiplyBy, plus, times, toDense, toString, zSum
public FloatVectorDataDense(float[] vectorSI)
vectorSI
- the data to storepublic final void assign(FloatFunction floatFunction)
floatFunction
- the function to apply on the (mutable) data elementspublic final FloatVectorDataSparse toSparse()
toSparse
in class FloatVectorData
public final int size()
size
in class FloatVectorData
public final float getSI(int index)
getSI
in class FloatVectorData
index
- the index to get the value forpublic final void setSI(int index, float valueSI)
setSI
in class FloatVectorData
index
- the index to set the value forvalueSI
- the value at the indexpublic final float[] getDenseVectorSI()
getDenseVectorSI
in class FloatVectorData
public final FloatVectorDataDense copy()
copy
in class FloatVectorData
public final void incrementBy(FloatVectorData right) throws ValueException
incrementBy
in class FloatVectorData
right
- the other data object to addValueException
- if vectors have different lengthspublic final void decrementBy(FloatVectorData right) throws ValueException
decrementBy
in class FloatVectorData
right
- the other data object to subtractValueException
- if vectors have different lengthspublic final void multiplyBy(FloatVectorData right) throws ValueException
multiplyBy
in class FloatVectorData
right
- the other data object to multiply withValueException
- if vectors have different lengthspublic final void divideBy(FloatVectorData right) throws ValueException
divideBy
in class FloatVectorData
right
- the other data object to divide byValueException
- if vectors have different lengthsCopyright © 2015–2018 Delft University of Technology. All rights reserved.