public class DoubleVectorDataDense 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 double[] |
vectorSI
the internal storage of the Vector; can be sparse or dense.
|
| Constructor and Description |
|---|
DoubleVectorDataDense(double[] vectorSI)
Create a vector with dense data.
|
| Modifier and Type | Method and Description |
|---|---|
void |
assign(DoubleFunction doubleFunction) |
int |
cardinality() |
DoubleVectorDataDense |
copy() |
org.djunits.value.vdouble.vector.DoubleVectorData |
divide(org.djunits.value.vdouble.vector.DoubleVectorData right)
Divide two vectors on a cell-by-cell basis.
|
boolean |
equals(Object obj) |
double[] |
getDenseVectorSI() |
double |
getSI(int index) |
int |
hashCode() |
org.djunits.value.vdouble.vector.DoubleVectorData |
minus(org.djunits.value.vdouble.vector.DoubleVectorData right)
Subtract two vectors on a cell-by-cell basis.
|
org.djunits.value.vdouble.vector.DoubleVectorData |
plus(org.djunits.value.vdouble.vector.DoubleVectorData right)
Add two vectors on a cell-by-cell basis.
|
void |
setSI(int index,
double valueSI)
Sets a value at the index in the vector.
|
int |
size() |
org.djunits.value.vdouble.vector.DoubleVectorData |
times(org.djunits.value.vdouble.vector.DoubleVectorData right)
Multiply two vector on a cell-by-cell basis.
|
DoubleVectorDataSparse |
toSparse() |
double |
zSum() |
protected double[] vectorSI
public DoubleVectorDataDense(double[] vectorSI)
vectorSI - the data to storepublic final void assign(DoubleFunction doubleFunction)
doubleFunction - the function to apply on the (mutable) data elementspublic final DoubleVectorDataSparse toSparse()
public final int size()
public final double getSI(int index)
index - the index to get the value forpublic final void setSI(int index,
double valueSI)
index - the index to set the value forvalueSI - the value at the indexpublic final double[] getDenseVectorSI()
public final DoubleVectorDataDense copy()
public final int cardinality()
public final double zSum()
public org.djunits.value.vdouble.vector.DoubleVectorData plus(org.djunits.value.vdouble.vector.DoubleVectorData right)
throws ValueException
right - the other data object to addValueException - if vectors have different lengthspublic org.djunits.value.vdouble.vector.DoubleVectorData minus(org.djunits.value.vdouble.vector.DoubleVectorData right)
throws ValueException
right - the other data object to subtractValueException - if vectors have different lengthspublic org.djunits.value.vdouble.vector.DoubleVectorData times(org.djunits.value.vdouble.vector.DoubleVectorData right)
throws ValueException
right - the other data object to multiply withValueException - if vectors have different lengthspublic org.djunits.value.vdouble.vector.DoubleVectorData divide(org.djunits.value.vdouble.vector.DoubleVectorData right)
throws ValueException
right - the other data object to divide byValueException - if vectors have different lengthsCopyright © 2015 Delft University of Technology. All rights reserved.