U - the unitpublic interface MutableFloatVectorInterface<U extends Unit<U>> extends FloatVectorInterface<U>
Copyright (c) 2013-2016 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 |
|---|---|
MutableFloatVectorInterface<U> |
copy()
Create a deep copy of this MutableFloatVector.
|
FloatVectorInterface<U> |
immutable()
Create a immutable version of this MutableFloatVector.
|
void |
normalize()
Normalize the vector, i.e.
|
void |
set(int index,
FloatScalar<U> value)
Replace the value at index by the supplied value which is in a compatible unit.
|
void |
setInUnit(int index,
float value,
U valueUnit)
Replace the value at index by the supplied value which is expressed in a supplied (compatible) unit.
|
void |
setSI(int index,
float valueSI)
Replace the value at index by the supplied value which is expressed in the standard SI unit.
|
MutableFloatVectorInterface<U> |
toDense()
Create a dense version of this FloatVector.
|
MutableFloatVectorInterface<U> |
toSparse()
Create a sparse version of this FloatVector.
|
cardinality, get, getInUnit, getInUnit, getSI, getValuesInUnit, getValuesInUnit, getValuesSI, mutable, size, toString, toString, toString, toString, zSumMutableFloatVectorInterface<U> copy()
FloatVectorInterface<U> immutable()
void setSI(int index,
float valueSI)
throws ValueException
index - int; index of the value to replacevalueSI - float; 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,
FloatScalar<U> value)
throws ValueException
index - int; index of the value to replacevalue - FloatScalar<U>; the strongly typed value to storeValueException - when index out of range (index < 0 or index >= size())void setInUnit(int index,
float value,
U valueUnit)
throws ValueException
index - int; index of the value to replacevalue - float; 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 possibleMutableFloatVectorInterface<U> toDense()
toDense in interface FloatVectorInterface<U extends Unit<U>>MutableFloatVectorInterface<U> toSparse()
toSparse in interface FloatVectorInterface<U extends Unit<U>>Copyright © 2015–2016 Delft University of Technology. All rights reserved.