public class FloatVectorDataDense extends Object
Copyright (c) 2013-2015 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
| Modifier and Type | Field and Description |
|---|---|
protected float[] |
vectorSI
the internal storage of the Vector; can be sparse or dense.
|
| Constructor and Description |
|---|
FloatVectorDataDense(float[] vectorSI)
Create a vector with dense data.
|
| Modifier and Type | Method and Description |
|---|---|
void |
assign(FloatFunction floatFunction) |
int |
cardinality() |
FloatVectorDataDense |
copy() |
org.djunits.value.vfloat.vector.FloatVectorData |
divide(org.djunits.value.vfloat.vector.FloatVectorData right)
Divide two vectors on a cell-by-cell basis.
|
boolean |
equals(Object obj) |
float[] |
getDenseVectorSI() |
float |
getSI(int index) |
int |
hashCode() |
org.djunits.value.vfloat.vector.FloatVectorData |
minus(org.djunits.value.vfloat.vector.FloatVectorData right)
Subtract two vectors on a cell-by-cell basis.
|
org.djunits.value.vfloat.vector.FloatVectorData |
plus(org.djunits.value.vfloat.vector.FloatVectorData right)
Add two vectors on a cell-by-cell basis.
|
void |
setSI(int index,
float valueSI)
Sets a value at the index in the vector.
|
int |
size() |
org.djunits.value.vfloat.vector.FloatVectorData |
times(org.djunits.value.vfloat.vector.FloatVectorData right)
Multiply two vector on a cell-by-cell basis.
|
FloatVectorDataSparse |
toSparse() |
float |
zSum() |
protected float[] vectorSI
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()
public final int size()
public final float getSI(int index)
index - the index to get the value forpublic final void setSI(int index,
float valueSI)
index - the index to set the value forvalueSI - the value at the indexpublic final float[] getDenseVectorSI()
public final FloatVectorDataDense copy()
public final int cardinality()
public final float zSum()
public org.djunits.value.vfloat.vector.FloatVectorData plus(org.djunits.value.vfloat.vector.FloatVectorData right)
throws ValueException
right - the other data object to addValueException - if vectors have different lengthspublic org.djunits.value.vfloat.vector.FloatVectorData minus(org.djunits.value.vfloat.vector.FloatVectorData right)
throws ValueException
right - the other data object to subtractValueException - if vectors have different lengthspublic org.djunits.value.vfloat.vector.FloatVectorData times(org.djunits.value.vfloat.vector.FloatVectorData right)
throws ValueException
right - the other data object to multiply withValueException - if vectors have different lengthspublic org.djunits.value.vfloat.vector.FloatVectorData divide(org.djunits.value.vfloat.vector.FloatVectorData right)
throws ValueException
right - the other data object to divide byValueException - if vectors have different lengthsCopyright © 2015 Delft University of Technology. All rights reserved.