public class MutableFloatFlowVolumeVector extends AbstractMutableFloatVectorRel<FlowVolumeUnit,FloatFlowVolumeVector,MutableFloatFlowVolumeVector,FloatFlowVolume>
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.
AbstractFloatVectorRel.Itr
data
Constructor and Description |
---|
MutableFloatFlowVolumeVector(float[] values,
FlowVolumeUnit unit,
StorageType storageType)
Construct a new Relative Immutable Float FlowVolumeVector.
|
MutableFloatFlowVolumeVector(FloatFlowVolume[] values,
StorageType storageType)
Construct a new Relative Immutable Float FlowVolumeVector.
|
MutableFloatFlowVolumeVector(FloatVectorData data,
FlowVolumeUnit unit) |
MutableFloatFlowVolumeVector(List<Float> values,
FlowVolumeUnit unit,
StorageType storageType)
Construct a new Relative Immutable Float FlowVolumeVector.
|
MutableFloatFlowVolumeVector(List<FloatFlowVolume> values,
StorageType storageType)
Construct a new Relative Immutable Float FlowVolumeVector.
|
MutableFloatFlowVolumeVector(SortedMap<Integer,Float> values,
FlowVolumeUnit unit,
int length,
StorageType storageType)
Construct a new Relative Immutable Float FlowVolumeVector.
|
MutableFloatFlowVolumeVector(SortedMap<Integer,FloatFlowVolume> values,
int length,
StorageType storageType)
Construct a new Relative Immutable Float FlowVolumeVector.
|
Modifier and Type | Method and Description |
---|---|
protected MutableFloatFlowVolumeVector |
instantiateMutableType(FloatVectorData dvd,
FlowVolumeUnit unit)
Construct a new Relative Mutable FloatVector of the right type.
|
protected FloatFlowVolume |
instantiateScalar(float value,
FlowVolumeUnit unit)
Construct a new Relative Immutable FloatScalar of the right type.
|
protected FloatFlowVolumeVector |
instantiateType(FloatVectorData dvd,
FlowVolumeUnit unit)
Construct a new Relative Immutable FloatVector of the right type.
|
FloatFlowVolume[] |
toArray()
Return an array of FloatFlowVolume Scalars from this vector.
|
MutableFloatFlowVolumeVector |
toDense()
return a dense version of this vector.
|
MutableFloatFlowVolumeVector |
toSparse()
return a sparse version of this vector.
|
abs, assign, ceil, checkCopyOnWrite, copy, decrementBy, decrementBy, decrementBy, divideBy, divideBy, divideBy, floor, immutable, incrementBy, incrementBy, incrementBy, multiplyBy, multiplyBy, multiplyBy, mutable, neg, normalize, rint, round, set, setCopyOnWrite, setInUnit, setSI
checkUnit, checkUnit, checkUnit, divide, get, iterator, minus, plus, times
cardinality, checkIndex, checkSize, checkSize, equals, getData, getInUnit, getInUnit, getSI, getStorageType, getValuesInUnit, getValuesInUnit, getValuesSI, hashCode, size, toString, toString, toString, toString, zSum
expressAsSIUnit, expressAsSpecifiedUnit, getUnit, isAbsolute, isRelative, setDisplayUnit
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
DIV, MULT, POW
cardinality, getInUnit, getInUnit, getSI, getValuesInUnit, getValuesInUnit, getValuesSI, size, toString, toString, toString, toString, zSum
forEach, spliterator
public MutableFloatFlowVolumeVector(float[] values, FlowVolumeUnit unit, StorageType storageType) throws ValueException
values
- float[]; the values of the entries in the new Relative Immutable Float FlowVolumeVectorunit
- U; the unit of the new Relative Immutable Float FlowVolumeVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic MutableFloatFlowVolumeVector(List<Float> values, FlowVolumeUnit unit, StorageType storageType) throws ValueException
values
- List; the values of the entries in the new Relative Immutable Float FlowVolumeVectorunit
- U; the unit of the new Relative Immutable Float FlowVolumeVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic MutableFloatFlowVolumeVector(FloatFlowVolume[] values, StorageType storageType) throws ValueException
values
- FloatScalar.Rel<U>[]; the values of the entries in the new Relative Immutable Float FlowVolumeVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic MutableFloatFlowVolumeVector(List<FloatFlowVolume> values, StorageType storageType) throws ValueException
values
- List; the values of the entries in the new Relative Immutable Float FlowVolumeVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic MutableFloatFlowVolumeVector(SortedMap<Integer,FloatFlowVolume> values, int length, StorageType storageType) throws ValueException
values
- FloatScalar.Rel<U>[]; the values of the entries in the new Relative Sparse Mutable Float
FlowVolumeVectorlength
- the size of the vectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic MutableFloatFlowVolumeVector(SortedMap<Integer,Float> values, FlowVolumeUnit unit, int length, StorageType storageType) throws ValueException
values
- Map; the map of indexes to values of the Relative Sparse Mutable Float FlowVolumeVectorunit
- U; the unit of the new Relative Sparse Mutable Float FlowVolumeVectorlength
- the size of the vectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullMutableFloatFlowVolumeVector(FloatVectorData data, FlowVolumeUnit unit)
data
- an internal data objectunit
- the unitprotected final FloatFlowVolumeVector instantiateType(FloatVectorData dvd, FlowVolumeUnit unit)
instantiateType
in class AbstractFloatVectorRel<FlowVolumeUnit,FloatFlowVolumeVector,MutableFloatFlowVolumeVector,FloatFlowVolume>
dvd
- an internal data objectunit
- the unitprotected final MutableFloatFlowVolumeVector instantiateMutableType(FloatVectorData dvd, FlowVolumeUnit unit)
instantiateMutableType
in class AbstractFloatVectorRel<FlowVolumeUnit,FloatFlowVolumeVector,MutableFloatFlowVolumeVector,FloatFlowVolume>
dvd
- an internal data objectunit
- the unitprotected final FloatFlowVolume instantiateScalar(float value, FlowVolumeUnit unit)
instantiateScalar
in class AbstractFloatVectorRel<FlowVolumeUnit,FloatFlowVolumeVector,MutableFloatFlowVolumeVector,FloatFlowVolume>
value
- the valueunit
- the unitpublic final MutableFloatFlowVolumeVector toDense()
public final MutableFloatFlowVolumeVector toSparse()
public FloatFlowVolume[] toArray()
RuntimeException
- wrapping a ValueException on error getting one of the valuesCopyright © 2015–2018 Delft University of Technology. All rights reserved.