public class MutableAngleVector extends AbstractMutableDoubleVectorRel<AngleUnit,AngleVector,MutableAngleVector,Angle>
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUNITS License.
$LastChangedDate: 2015-09-29 14:14:28 +0200 (Tue, 29 Sep 2015) $, @version $Revision: 73 $, by $Author: pknoppers $, initial
version Sep 5, 2015
AbstractDoubleVectorRel.Itr
data
Constructor and Description |
---|
MutableAngleVector(Angle[] values,
StorageType storageType)
Construct a new Relative Mutable Double AngleVector.
|
MutableAngleVector(double[] values,
AngleUnit unit,
StorageType storageType)
Construct a new Relative Mutable Double AngleVector.
|
MutableAngleVector(DoubleVectorData data,
AngleUnit unit)
Construct a new Relative Mutable Double AngleVector.
|
MutableAngleVector(List<Angle> values,
StorageType storageType)
Construct a new Relative Mutable Double AngleVector.
|
MutableAngleVector(List<Double> values,
AngleUnit unit,
StorageType storageType)
Construct a new Relative Mutable Double AngleVector.
|
MutableAngleVector(SortedMap<Integer,Angle> values,
int length,
StorageType storageType)
Construct a new Relative Mutable Double AngleVector.
|
MutableAngleVector(SortedMap<Integer,Double> values,
AngleUnit unit,
int length,
StorageType storageType)
Construct a new Relative Mutable Double AngleVector.
|
Modifier and Type | Method and Description |
---|---|
protected MutableAngleVector |
instantiateMutableType(DoubleVectorData dvd,
AngleUnit unit)
Construct a new Relative Mutable DoubleVector of the right type.
|
protected Angle |
instantiateScalar(double value,
AngleUnit unit)
Construct a new Relative Immutable DoubleScalar of the right type.
|
protected AngleVector |
instantiateType(DoubleVectorData dvd,
AngleUnit unit)
Construct a new Relative Immutable DoubleVector of the right type.
|
Angle[] |
toArray()
Return an array of Angle Scalars from this vector.
|
MutableAngleVector |
toDense()
return a dense version of this vector.
|
MutableAngleVector |
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, get, getInUnit, getInUnit, getSI, getValuesInUnit, getValuesInUnit, getValuesSI, size, toString, toString, toString, toString, zSum
forEach, spliterator
public MutableAngleVector(double[] values, AngleUnit unit, StorageType storageType) throws ValueException
values
- double[]; the values of the entries in the new Relative Mutable Double AngleVectorunit
- AngleUnit; the unit of the new Relative Mutable Double AngleVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic MutableAngleVector(List<Double> values, AngleUnit unit, StorageType storageType) throws ValueException
values
- List<Double>; the values of the entries in the new Relative Mutable Double AngleVectorunit
- AngleUnit; the unit of the new Relative Mutable Double AngleVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic MutableAngleVector(Angle[] values, StorageType storageType) throws ValueException
values
- Angle[]; the values of the entries in the new Relative Mutable Double AngleVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic MutableAngleVector(List<Angle> values, StorageType storageType) throws ValueException
values
- List<Angle>; the values of the entries in the new Relative Mutable Double AngleVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic MutableAngleVector(SortedMap<Integer,Angle> values, int length, StorageType storageType) throws ValueException
values
- SortedMap<Integer, Angle>; the values of the entries in the new Relative Sparse Mutable Double
AngleVectorlength
- int; the size of the vectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic MutableAngleVector(SortedMap<Integer,Double> values, AngleUnit unit, int length, StorageType storageType) throws ValueException
values
- SortedMap<Integer, Double>; the map of indexes to values of the Relative Sparse Mutable Double
AngleVectorunit
- AngleUnit; the unit of the new Relative Sparse Mutable Double AngleVectorlength
- int; the size of the vectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullMutableAngleVector(DoubleVectorData data, AngleUnit unit)
data
- DoubleVectorData; an internal data objectunit
- AngleUnit; the unitprotected final AngleVector instantiateType(DoubleVectorData dvd, AngleUnit unit)
instantiateType
in class AbstractDoubleVectorRel<AngleUnit,AngleVector,MutableAngleVector,Angle>
dvd
- DoubleVectorData; an internal data objectunit
- U; the unitprotected final MutableAngleVector instantiateMutableType(DoubleVectorData dvd, AngleUnit unit)
instantiateMutableType
in class AbstractDoubleVectorRel<AngleUnit,AngleVector,MutableAngleVector,Angle>
dvd
- DoubleVectorData; an internal data objectunit
- U; the unitprotected final Angle instantiateScalar(double value, AngleUnit unit)
instantiateScalar
in class AbstractDoubleVectorRel<AngleUnit,AngleVector,MutableAngleVector,Angle>
value
- double; the valueunit
- U; the unitpublic final MutableAngleVector toDense()
public final MutableAngleVector toSparse()
public Angle[] toArray()
RuntimeException
- wrapping a ValueException on error getting one of the valuesCopyright © 2015–2019 Delft University of Technology. All rights reserved.