public class AngleVector extends AbstractDoubleVectorRel<AngleUnit,AngleVector,MutableAngleVector,Angle>
Copyright (c) 2013-2017 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
data
Constructor and Description |
---|
AngleVector(Angle[] values,
StorageType storageType)
Construct a new Relative Immutable Double AngleVector.
|
AngleVector(double[] values,
AngleUnit unit,
StorageType storageType)
Construct a new Relative Immutable Double AngleVector.
|
AngleVector(DoubleVectorData data,
AngleUnit unit)
Construct a new Relative Immutable Double AngleVector.
|
AngleVector(List<Angle> values,
StorageType storageType)
Construct a new Relative Immutable Double AngleVector.
|
AngleVector(List<Double> values,
AngleUnit unit,
StorageType storageType)
Construct a new Relative Immutable Double AngleVector.
|
AngleVector(SortedMap<Integer,Angle> values,
int length,
StorageType storageType)
Construct a new Relative Immutable Double AngleVector.
|
AngleVector(SortedMap<Integer,Double> values,
AngleUnit unit,
int length,
StorageType storageType)
Construct a new Relative Immutable 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.
|
AngleVector |
toDense()
return a dense version of this vector.
|
AngleVector |
toSparse()
return a sparse version of this vector.
|
checkUnit, checkUnit, checkUnit, divide, get, minus, mutable, 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
public AngleVector(double[] values, AngleUnit unit, StorageType storageType) throws ValueException
values
- double[]; the values of the entries in the new Relative Immutable Double AngleVectorunit
- U; the unit of the new Relative Immutable Double AngleVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic AngleVector(List<Double> values, AngleUnit unit, StorageType storageType) throws ValueException
values
- List; the values of the entries in the new Relative Immutable Double AngleVectorunit
- U; the unit of the new Relative Immutable Double AngleVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic AngleVector(Angle[] values, StorageType storageType) throws ValueException
values
- DoubleScalar.Rel<U>[]; the values of the entries in the new Relative Immutable Double AngleVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic AngleVector(List<Angle> values, StorageType storageType) throws ValueException
values
- List; the values of the entries in the new Relative Immutable Double AngleVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic AngleVector(SortedMap<Integer,Angle> values, int length, StorageType storageType) throws ValueException
values
- DoubleScalar.Rel<U>[]; the values of the entries in the new Relative Sparse Mutable Double
AngleVectorlength
- the size of the vectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic AngleVector(SortedMap<Integer,Double> values, AngleUnit unit, int length, StorageType storageType) throws ValueException
values
- Map; the map of indexes to values of the Relative Sparse Mutable Double AngleVectorunit
- U; the unit of the new Relative Sparse Mutable Double AngleVectorlength
- the size of the vectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullAngleVector(DoubleVectorData data, AngleUnit unit)
data
- an internal data objectunit
- the unitprotected final AngleVector instantiateType(DoubleVectorData dvd, AngleUnit unit)
instantiateType
in class AbstractDoubleVectorRel<AngleUnit,AngleVector,MutableAngleVector,Angle>
dvd
- an internal data objectunit
- the unitprotected final MutableAngleVector instantiateMutableType(DoubleVectorData dvd, AngleUnit unit)
instantiateMutableType
in class AbstractDoubleVectorRel<AngleUnit,AngleVector,MutableAngleVector,Angle>
dvd
- an internal data objectunit
- the unitprotected final Angle instantiateScalar(double value, AngleUnit unit)
instantiateScalar
in class AbstractDoubleVectorRel<AngleUnit,AngleVector,MutableAngleVector,Angle>
value
- the valueunit
- the unitpublic final AngleVector toDense()
public final AngleVector toSparse()
Copyright © 2015–2017 Delft University of Technology. All rights reserved.