U - the unitpublic interface MutableDoubleVectorInterface<U extends Unit<U>> extends DoubleVectorInterface<U>
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 | Method and Description |
|---|---|
MutableDoubleVectorInterface<U> |
copy()
Create a deep copy of this MutableDoubleVector.
|
DoubleVectorInterface<U> |
immutable()
Create a immutable version of this MutableDoubleVector.
|
void |
normalize()
Normalize the vector, i.e.
|
void |
set(int index,
DoubleScalar<U> value)
Replace the value at index by the supplied value which is in a compatible unit.
|
void |
setInUnit(int index,
double value,
U valueUnit)
Replace the value at index by the supplied value which is expressed in a supplied (compatible) unit.
|
void |
setSI(int index,
double valueSI)
Replace the value at index by the supplied value which is expressed in the standard SI unit.
|
MutableDoubleVectorInterface<U> |
toDense()
Create a dense version of this DoubleVector.
|
MutableDoubleVectorInterface<U> |
toSparse()
Create a sparse version of this DoubleVector.
|
cardinality, get, getInUnit, getInUnit, getSI, getValuesInUnit, getValuesInUnit, getValuesSI, mutable, size, toString, toString, toString, toString, zSumMutableDoubleVectorInterface<U> copy()
DoubleVectorInterface<U> immutable()
void setSI(int index,
double valueSI)
throws ValueException
index - int; index of the value to replacevalueSI - double; the value to store (expressed in the standard SI unit)ValueException - when index out of range (index < 0 or index >= size())void set(int index,
DoubleScalar<U> value)
throws ValueException
index - int; index of the value to replacevalue - DoubleScalar<U>; the strongly typed value to storeValueException - when index out of range (index < 0 or index >= size())void setInUnit(int index,
double value,
U valueUnit)
throws ValueException
index - int; index of the value to replacevalue - double; the value to store (which is expressed in valueUnit)valueUnit - U; unit of the supplied valueValueException - when index out of range (index < 0 or index >= size())void normalize()
throws ValueException
ValueException - when the sum of the values is zero and normalization is not possibleMutableDoubleVectorInterface<U> toDense()
toDense in interface DoubleVectorInterface<U extends Unit<U>>MutableDoubleVectorInterface<U> toSparse()
toSparse in interface DoubleVectorInterface<U extends Unit<U>>Copyright © 2015 Delft University of Technology. All rights reserved.