U
- Unit; the unit of this DoubleVectorpublic abstract class DoubleVector<U extends Unit<U>> extends AbstractValue<U> implements Serializable, ReadOnlyDoubleVectorFunctions<U>
This file was generated by the OpenTrafficSim value classes generator, 09 mrt, 2015
Copyright (c) 2014 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Modifier and Type | Class and Description |
---|---|
static class |
DoubleVector.Abs<U extends Unit<U>> |
static class |
DoubleVector.Rel<U extends Unit<U>> |
Modifier | Constructor and Description |
---|---|
protected |
DoubleVector(U unit)
Construct a new Immutable DoubleVector.
|
Modifier and Type | Method and Description |
---|---|
int |
cardinality()
Count the number of cells that have a non-zero value (ignores tolerance).
|
protected void |
checkIndex(int index)
Check that a provided index is valid.
|
protected static <U extends Unit<U>> |
checkNonEmpty(DoubleScalar<U>[] dsArray)
Check that a provided array can be used to create some descendant of a DoubleVector.
|
protected void |
checkSize(double[] other)
Centralized size equality check.
|
protected void |
checkSize(DoubleVector<?> other)
Centralized size equality check.
|
protected abstract cern.colt.matrix.tdouble.DoubleMatrix1D |
createMatrix1D(int size)
Create storage for the data.
|
protected void |
deepCopyData()
Make a deep copy of the data (used ONLY in the MutableDoubleVector sub class).
|
protected cern.colt.matrix.tdouble.DoubleMatrix1D |
deepCopyOfData()
Create a deep copy of the data.
|
static <U extends Unit<U>> |
denseToSparse(DoubleVector.Abs.Dense<U> in)
Create a Sparse version of a Dense DoubleVector.
|
static <U extends Unit<U>> |
denseToSparse(DoubleVector.Rel.Dense<U> in)
Create a Sparse version of a Dense DoubleVector.
|
boolean |
equals(Object obj) |
double |
getInUnit(int index)
Retrieve the value stored at a specified position in the original unit.
|
double |
getInUnit(int index,
U targetUnit)
Retrieve the value stored at a specified position converted into a specified unit.
|
double |
getSI(int index)
Retrieve the value stored at a specified position in the standard SI unit.
|
double[] |
getValuesInUnit()
Create a double[] array filled with the values in the original unit.
|
double[] |
getValuesInUnit(U targetUnit)
Create a double[] array filled with the values converted into a specified unit.
|
double[] |
getValuesSI()
Create a double[] array filled with the values in the standard SI unit.
|
protected cern.colt.matrix.tdouble.DoubleMatrix1D |
getVectorSI()
Retrieve the internal data.
|
int |
hashCode() |
protected void |
initialize(double[] values)
Import the values and convert them into the SI standard unit.
|
protected void |
initialize(cern.colt.matrix.tdouble.DoubleMatrix1D values)
Import the values from an existing DoubleMatrix1D.
|
protected void |
initialize(DoubleScalar<U>[] values)
Construct the vector and store the values in the standard SI unit.
|
static <U extends Unit<U>> |
interpolate(DoubleVector.Abs.Dense<U> zero,
DoubleVector.Abs.Dense<U> one,
double ratio)
Interpolate between or extrapolate over two values.
|
static <U extends Unit<U>> |
interpolate(DoubleVector.Abs.Sparse<U> zero,
DoubleVector.Abs.Sparse<U> one,
double ratio)
Interpolate between or extrapolate over two values.
|
static <U extends Unit<U>> |
interpolate(DoubleVector.Rel.Dense<U> zero,
DoubleVector.Rel.Dense<U> one,
double ratio)
Interpolate between or extrapolate over two values.
|
static <U extends Unit<U>> |
interpolate(DoubleVector.Rel.Sparse<U> zero,
DoubleVector.Rel.Sparse<U> one,
double ratio)
Interpolate between or extrapolate over two values.
|
static <U extends Unit<U>> |
minus(DoubleVector.Abs.Dense<U> left,
DoubleVector.Abs<U> right)
Subtract two DoubleVectors value by value and store the result in a new MutableDoubleVector.Rel.Dense<U>.
|
static <U extends Unit<U>> |
minus(DoubleVector.Abs.Dense<U> left,
DoubleVector.Rel<U> right)
Subtract two DoubleVectors value by value and store the result in a new MutableDoubleVector.Abs.Dense<U>.
|
static <U extends Unit<U>> |
minus(DoubleVector.Abs.Sparse<U> left,
DoubleVector.Abs.Dense<U> right)
Subtract two DoubleVectors value by value and store the result in a new MutableDoubleVector.Rel.Dense<U>.
|
static <U extends Unit<U>> |
minus(DoubleVector.Abs.Sparse<U> left,
DoubleVector.Abs.Sparse<U> right)
Subtract two DoubleVectors value by value and store the result in a new MutableDoubleVector.Rel.Sparse<U>.
|
static <U extends Unit<U>> |
minus(DoubleVector.Abs.Sparse<U> left,
DoubleVector.Rel.Dense<U> right)
Subtract two DoubleVectors value by value and store the result in a new MutableDoubleVector.Abs.Dense<U>.
|
static <U extends Unit<U>> |
minus(DoubleVector.Abs.Sparse<U> left,
DoubleVector.Rel.Sparse<U> right)
Subtract two DoubleVectors value by value and store the result in a new MutableDoubleVector.Abs.Sparse<U>.
|
static <U extends Unit<U>> |
minus(DoubleVector.Rel.Dense<U> left,
DoubleVector.Rel<U> right)
Subtract two DoubleVectors value by value and store the result in a new MutableDoubleVector.Rel.Dense<U>.
|
static <U extends Unit<U>> |
minus(DoubleVector.Rel.Sparse<U> left,
DoubleVector.Rel.Dense<U> right)
Subtract two DoubleVectors value by value and store the result in a new MutableDoubleVector.Rel.Dense<U>.
|
static <U extends Unit<U>> |
minus(DoubleVector.Rel.Sparse<U> left,
DoubleVector.Rel.Sparse<U> right)
Subtract two DoubleVectors value by value and store the result in a new MutableDoubleVector.Rel.Sparse<U>.
|
abstract MutableDoubleVector<U> |
mutable()
Create a mutable version of this DoubleVector.
|
static <U extends Unit<U>> |
plus(DoubleVector.Abs.Dense<U> left,
DoubleVector.Rel<U> right)
Add two DoubleVectors value by value and store the result in a new MutableDoubleVector.Abs.Dense<U>.
|
static <U extends Unit<U>> |
plus(DoubleVector.Abs.Sparse<U> left,
DoubleVector.Rel.Dense<U> right)
Add two DoubleVectors value by value and store the result in a new MutableDoubleVector.Abs.Dense<U>.
|
static <U extends Unit<U>> |
plus(DoubleVector.Abs.Sparse<U> left,
DoubleVector.Rel.Sparse<U> right)
Add two DoubleVectors value by value and store the result in a new MutableDoubleVector.Abs.Sparse<U>.
|
static <U extends Unit<U>> |
plus(DoubleVector.Rel.Dense<U> left,
DoubleVector.Rel<U> right)
Add two DoubleVectors value by value and store the result in a new MutableDoubleVector.Rel.Dense<U>.
|
static <U extends Unit<U>> |
plus(DoubleVector.Rel.Sparse<U> left,
DoubleVector.Rel.Dense<U> right)
Add two DoubleVectors value by value and store the result in a new MutableDoubleVector.Rel.Dense<U>.
|
static <U extends Unit<U>> |
plus(DoubleVector.Rel.Sparse<U> left,
DoubleVector.Rel.Sparse<U> right)
Add two DoubleVectors value by value and store the result in a new MutableDoubleVector.Rel.Sparse<U>.
|
protected double |
safeGet(int index)
Retrieve a value in vectorSI without checking validity of the index.
|
protected void |
safeSet(int index,
double valueSI)
Modify a value in vectorSI without checking validity of the index.
|
int |
size()
Retrieve the size of the vector.
|
static <U extends Unit<U>> |
sparseToDense(DoubleVector.Abs.Sparse<U> in)
Create a Dense version of a Sparse DoubleVector.
|
static <U extends Unit<U>> |
sparseToDense(DoubleVector.Rel.Sparse<U> in)
Create a Dense version of a Sparse DoubleVector.
|
static MutableDoubleVector.Abs.Dense<SIUnit> |
times(DoubleVector.Abs.Dense<?> left,
DoubleVector.Abs.Dense<?> right)
Multiply two DoubleVectors value by value and store the result in a new
MutableDoubleVector.Abs.Dense<SIUnit>.
|
static MutableDoubleVector.Abs.Sparse<SIUnit> |
times(DoubleVector.Abs.Dense<?> left,
DoubleVector.Abs.Sparse<?> right)
Multiply two DoubleVectors value by value and store the result in a new
MutableDoubleVector.Abs.Sparse<SIUnit>.
|
static <U extends Unit<U>> |
times(DoubleVector.Abs.Dense<U> left,
double[] right)
Multiply the values in a DoubleVector and a double array value by value and store the result in a new
MutableDoubleVector.Abs.Dense<U>.
|
static MutableDoubleVector.Abs.Sparse<SIUnit> |
times(DoubleVector.Abs.Sparse<?> left,
DoubleVector.Abs<?> right)
Multiply two DoubleVectors value by value and store the result in a new
MutableDoubleVector.Abs.Sparse<SIUnit>.
|
static <U extends Unit<U>> |
times(DoubleVector.Abs.Sparse<U> left,
double[] right)
Multiply the values in a DoubleVector and a double array value by value and store the result in a new
MutableDoubleVector.Abs.Sparse<U>.
|
static MutableDoubleVector.Rel.Dense<SIUnit> |
times(DoubleVector.Rel.Dense<?> left,
DoubleVector.Rel.Dense<?> right)
Multiply two DoubleVectors value by value and store the result in a new
MutableDoubleVector.Rel.Dense<SIUnit>.
|
static MutableDoubleVector.Rel.Sparse<SIUnit> |
times(DoubleVector.Rel.Dense<?> left,
DoubleVector.Rel.Sparse<?> right)
Multiply two DoubleVectors value by value and store the result in a new
MutableDoubleVector.Rel.Sparse<SIUnit>.
|
static <U extends Unit<U>> |
times(DoubleVector.Rel.Dense<U> left,
double[] right)
Multiply the values in a DoubleVector and a double array value by value and store the result in a new
MutableDoubleVector.Rel.Dense<U>.
|
static MutableDoubleVector.Rel.Sparse<SIUnit> |
times(DoubleVector.Rel.Sparse<?> left,
DoubleVector.Rel<?> right)
Multiply two DoubleVectors value by value and store the result in a new
MutableDoubleVector.Rel.Sparse<SIUnit>.
|
static <U extends Unit<U>> |
times(DoubleVector.Rel.Sparse<U> left,
double[] right)
Multiply the values in a DoubleVector and a double array value by value and store the result in a new
MutableDoubleVector.Rel.Sparse<U>.
|
String |
toString() |
String |
toString(boolean verbose,
boolean withUnit)
Print this DoubleVector with optional type and unit information.
|
String |
toString(U displayUnit)
Print this DoubleVector with the values expressed in the specified unit.
|
String |
toString(U displayUnit,
boolean verbose,
boolean withUnit)
Print this DoubleVector with the values expressed in the specified unit.
|
double |
zSum()
Compute the sum of all values of this vector.
|
expressAsSIUnit, expressAsSpecifiedUnit, getUnit, isAbsolute, isRelative
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
get
protected DoubleVector(U unit)
unit
- U; the unit of the new DoubleVectorprotected final cern.colt.matrix.tdouble.DoubleMatrix1D getVectorSI()
protected final void deepCopyData()
public abstract MutableDoubleVector<U> mutable()
protected final void initialize(double[] values) throws ValueException
values
- double[]; an array of valuesValueException
- when values is nullprotected final void initialize(cern.colt.matrix.tdouble.DoubleMatrix1D values)
values
- DoubleMatrix1D; the valuesprotected final void initialize(DoubleScalar<U>[] values) throws ValueException
values
- DoubleScalar<U>[]; an array of valuesValueException
- when values is null, or emptyprotected abstract cern.colt.matrix.tdouble.DoubleMatrix1D createMatrix1D(int size)
size
- int; the number of cells in the vectorpublic final double[] getValuesSI()
public final double[] getValuesInUnit()
public final double[] getValuesInUnit(U targetUnit)
targetUnit
- U; the unit into which the values are converted for usepublic final int size()
size
in interface ReadOnlyDoubleVectorFunctions<U extends Unit<U>>
public final double getSI(int index) throws ValueException
getSI
in interface ReadOnlyDoubleVectorFunctions<U extends Unit<U>>
index
- int; index of the value to retrieveValueException
- when index out of range (index < 0 or index >= size())public final double getInUnit(int index) throws ValueException
getInUnit
in interface ReadOnlyDoubleVectorFunctions<U extends Unit<U>>
index
- int; index of the value to retrieveValueException
- when index out of range (index < 0 or index >= size())public final double getInUnit(int index, U targetUnit) throws ValueException
getInUnit
in interface ReadOnlyDoubleVectorFunctions<U extends Unit<U>>
index
- int; index of the value to retrievetargetUnit
- U; the unit for the resultValueException
- when index out of range (index < 0 or index >= size())public final double zSum()
zSum
in interface ReadOnlyDoubleVectorFunctions<U extends Unit<U>>
public final int cardinality()
cardinality
in interface ReadOnlyDoubleVectorFunctions<U extends Unit<U>>
public final String toString(U displayUnit)
displayUnit
- U; the unit into which the values are converted for displaypublic final String toString(boolean verbose, boolean withUnit)
verbose
- boolean; if true; include type info; if false; exclude type infowithUnit
- boolean; if true; include the unit; of false; exclude the unitpublic final String toString(U displayUnit, boolean verbose, boolean withUnit)
displayUnit
- U; the unit into which the values are converted for displayverbose
- boolean; if true; include type info; if false; exclude type infowithUnit
- boolean; if true; include the unit; of false; exclude the unitprotected final void checkSize(DoubleVector<?> other) throws ValueException
other
- DoubleVector<?>; other DoubleVectorValueException
- when other is null, or vectors have unequal sizeprotected final void checkSize(double[] other) throws ValueException
other
- double[]; array of doubleValueException
- when vectors have unequal sizeprotected final void checkIndex(int index) throws ValueException
index
- int; the value to checkValueException
- when index is invalidprotected final double safeGet(int index)
index
- int; the indexprotected final void safeSet(int index, double valueSI)
index
- int; the indexvalueSI
- double; the new value for the entry in vectorSIprotected final cern.colt.matrix.tdouble.DoubleMatrix1D deepCopyOfData()
protected static <U extends Unit<U>> DoubleScalar<U>[] checkNonEmpty(DoubleScalar<U>[] dsArray) throws ValueException
U
- Unit; the unit of the DoubleScalar arraydsArray
- DoubleScalar<U>[]; the provided arrayValueException
- when the array has length equal to 0public static <U extends Unit<U>> MutableDoubleVector.Abs.Dense<U> plus(DoubleVector.Abs.Dense<U> left, DoubleVector.Rel<U> right) throws ValueException
U
- Unit; the unit of the parameters and the resultleft
- DoubleVector.Abs.Dense<U>; the left operandright
- DoubleVector.Rel<U>; the right operandValueException
- when the vectors do not have the same sizepublic static <U extends Unit<U>> MutableDoubleVector.Abs.Dense<U> plus(DoubleVector.Abs.Sparse<U> left, DoubleVector.Rel.Dense<U> right) throws ValueException
U
- Unit; the unit of the parameters and the resultleft
- DoubleVector.Abs.Sparse<U>; the left operandright
- DoubleVector.Rel.Dense<U>; the right operandValueException
- when the vectors do not have the same sizepublic static <U extends Unit<U>> MutableDoubleVector.Abs.Sparse<U> plus(DoubleVector.Abs.Sparse<U> left, DoubleVector.Rel.Sparse<U> right) throws ValueException
U
- Unit; the unit of the parameters and the resultleft
- DoubleVector.Abs.Sparse<U>; the left operandright
- DoubleVector.Rel.Sparse<U>; the right operandValueException
- when the vectors do not have the same sizepublic static <U extends Unit<U>> MutableDoubleVector.Rel.Dense<U> plus(DoubleVector.Rel.Dense<U> left, DoubleVector.Rel<U> right) throws ValueException
U
- Unit; the unit of the parameters and the resultleft
- DoubleVector.Rel.Dense<U>; the left operandright
- DoubleVector.Rel<U>; the right operandValueException
- when the vectors do not have the same sizepublic static <U extends Unit<U>> MutableDoubleVector.Rel.Dense<U> plus(DoubleVector.Rel.Sparse<U> left, DoubleVector.Rel.Dense<U> right) throws ValueException
U
- Unit; the unit of the parameters and the resultleft
- DoubleVector.Rel.Sparse<U>; the left operandright
- DoubleVector.Rel.Dense<U>; the right operandValueException
- when the vectors do not have the same sizepublic static <U extends Unit<U>> MutableDoubleVector.Rel.Sparse<U> plus(DoubleVector.Rel.Sparse<U> left, DoubleVector.Rel.Sparse<U> right) throws ValueException
U
- Unit; the unit of the parameters and the resultleft
- DoubleVector.Rel.Sparse<U>; the left operandright
- DoubleVector.Rel.Sparse<U>; the right operandValueException
- when the vectors do not have the same sizepublic static <U extends Unit<U>> MutableDoubleVector.Rel.Dense<U> minus(DoubleVector.Abs.Dense<U> left, DoubleVector.Abs<U> right) throws ValueException
U
- Unit; the unit of the parameters and the resultleft
- DoubleVector.Abs.Dense<U>; the left operandright
- DoubleVector.Abs<U>; the right operandValueException
- when the vectors do not have the same sizepublic static <U extends Unit<U>> MutableDoubleVector.Rel.Sparse<U> minus(DoubleVector.Abs.Sparse<U> left, DoubleVector.Abs.Sparse<U> right) throws ValueException
U
- Unit; the unit of the parameters and the resultleft
- DoubleVector.Abs.Sparse<U>; the left operandright
- DoubleVector.Abs.Sparse<U>; the right operandValueException
- when the vectors do not have the same sizepublic static <U extends Unit<U>> MutableDoubleVector.Rel.Dense<U> minus(DoubleVector.Abs.Sparse<U> left, DoubleVector.Abs.Dense<U> right) throws ValueException
U
- Unit; the unit of the parameters and the resultleft
- DoubleVector.Abs.Sparse<U>; the left operandright
- DoubleVector.Abs.Dense<U>; the right operandValueException
- when the vectors do not have the same sizepublic static <U extends Unit<U>> MutableDoubleVector.Abs.Dense<U> minus(DoubleVector.Abs.Dense<U> left, DoubleVector.Rel<U> right) throws ValueException
U
- Unit; the unit of the parameters and the resultleft
- DoubleVector.Abs.Dense<U>; the left operandright
- DoubleVector.Rel<U>; the right operandValueException
- when the vectors do not have the same sizepublic static <U extends Unit<U>> MutableDoubleVector.Abs.Dense<U> minus(DoubleVector.Abs.Sparse<U> left, DoubleVector.Rel.Dense<U> right) throws ValueException
U
- Unit; the unit of the parameters and the resultleft
- DoubleVector.Abs.Sparse<U>; the left operandright
- DoubleVector.Rel.Dense<U>; the right operandValueException
- when the vectors do not have the same sizepublic static <U extends Unit<U>> MutableDoubleVector.Abs.Sparse<U> minus(DoubleVector.Abs.Sparse<U> left, DoubleVector.Rel.Sparse<U> right) throws ValueException
U
- Unit; the unit of the parameters and the resultleft
- DoubleVector.Abs.Sparse<U>; the left operandright
- DoubleVector.Rel.Sparse<U>; the right operandValueException
- when the vectors do not have the same sizepublic static <U extends Unit<U>> MutableDoubleVector.Rel.Dense<U> minus(DoubleVector.Rel.Dense<U> left, DoubleVector.Rel<U> right) throws ValueException
U
- Unit; the unit of the parameters and the resultleft
- DoubleVector.Rel.Dense<U>; the left operandright
- DoubleVector.Rel<U>; the right operandValueException
- when the vectors do not have the same sizepublic static <U extends Unit<U>> MutableDoubleVector.Rel.Dense<U> minus(DoubleVector.Rel.Sparse<U> left, DoubleVector.Rel.Dense<U> right) throws ValueException
U
- Unit; the unit of the parameters and the resultleft
- DoubleVector.Rel.Sparse<U>; the left operandright
- DoubleVector.Rel.Dense<U>; the right operandValueException
- when the vectors do not have the same sizepublic static <U extends Unit<U>> MutableDoubleVector.Rel.Sparse<U> minus(DoubleVector.Rel.Sparse<U> left, DoubleVector.Rel.Sparse<U> right) throws ValueException
U
- Unit; the unit of the parameters and the resultleft
- DoubleVector.Rel.Sparse<U>; the left operandright
- DoubleVector.Rel.Sparse<U>; the right operandValueException
- when the vectors do not have the same sizepublic static MutableDoubleVector.Abs.Dense<SIUnit> times(DoubleVector.Abs.Dense<?> left, DoubleVector.Abs.Dense<?> right) throws ValueException
left
- DoubleVector.Abs.Dense<?>; the left operandright
- DoubleVector.Abs.Dense<?>; the right operandValueException
- when the vectors do not have the same sizepublic static MutableDoubleVector.Abs.Sparse<SIUnit> times(DoubleVector.Abs.Dense<?> left, DoubleVector.Abs.Sparse<?> right) throws ValueException
left
- DoubleVector.Abs.Dense<?>; the left operandright
- DoubleVector.Abs.Sparse<?>; the right operandValueException
- when the vectors do not have the same sizepublic static MutableDoubleVector.Abs.Sparse<SIUnit> times(DoubleVector.Abs.Sparse<?> left, DoubleVector.Abs<?> right) throws ValueException
left
- DoubleVector.Abs.Sparse<?>; the left operandright
- DoubleVector.Abs<?>; the right operandValueException
- when the vectors do not have the same sizepublic static MutableDoubleVector.Rel.Dense<SIUnit> times(DoubleVector.Rel.Dense<?> left, DoubleVector.Rel.Dense<?> right) throws ValueException
left
- DoubleVector.Rel.Dense<?>; the left operandright
- DoubleVector.Rel.Dense<?>; the right operandValueException
- when the vectors do not have the same sizepublic static MutableDoubleVector.Rel.Sparse<SIUnit> times(DoubleVector.Rel.Dense<?> left, DoubleVector.Rel.Sparse<?> right) throws ValueException
left
- DoubleVector.Rel.Dense<?>; the left operandright
- DoubleVector.Rel.Sparse<?>; the right operandValueException
- when the vectors do not have the same sizepublic static MutableDoubleVector.Rel.Sparse<SIUnit> times(DoubleVector.Rel.Sparse<?> left, DoubleVector.Rel<?> right) throws ValueException
left
- DoubleVector.Rel.Sparse<?>; the left operandright
- DoubleVector.Rel<?>; the right operandValueException
- when the vectors do not have the same sizepublic static <U extends Unit<U>> MutableDoubleVector.Abs.Dense<U> times(DoubleVector.Abs.Dense<U> left, double[] right) throws ValueException
U
- Unit; the unit of the left parameter and the resultleft
- DoubleVector.Abs.Dense<U>; the DoubleVectorright
- double[]; the double arrayValueException
- when the DoubleVector and the array do not have the same sizepublic static <U extends Unit<U>> MutableDoubleVector.Abs.Sparse<U> times(DoubleVector.Abs.Sparse<U> left, double[] right) throws ValueException
U
- Unit; the unit of the left parameter and the resultleft
- DoubleVector.Abs.Sparse<U>; the DoubleVectorright
- double[]; the double arrayValueException
- when the DoubleVector and the array do not have the same sizepublic static <U extends Unit<U>> MutableDoubleVector.Rel.Dense<U> times(DoubleVector.Rel.Dense<U> left, double[] right) throws ValueException
U
- Unit; the unit of the left parameter and the resultleft
- DoubleVector.Rel.Dense<U>; the DoubleVectorright
- double[]; the double arrayValueException
- when the DoubleVector and the array do not have the same sizepublic static <U extends Unit<U>> MutableDoubleVector.Rel.Sparse<U> times(DoubleVector.Rel.Sparse<U> left, double[] right) throws ValueException
U
- Unit; the unit of the left parameter and the resultleft
- DoubleVector.Rel.Sparse<U>; the DoubleVectorright
- double[]; the double arrayValueException
- when the DoubleVector and the array do not have the same sizepublic static <U extends Unit<U>> MutableDoubleVector.Abs.Sparse<U> denseToSparse(DoubleVector.Abs.Dense<U> in)
U
- Unit; the unit of the parameter and the resultin
- DoubleVector.Abs.Dense<U>; the Dense DoubleVectorpublic static <U extends Unit<U>> MutableDoubleVector.Rel.Sparse<U> denseToSparse(DoubleVector.Rel.Dense<U> in)
U
- Unit; the unit of the parameter and the resultin
- DoubleVector.Rel.Dense<U>; the Dense DoubleVectorpublic static <U extends Unit<U>> MutableDoubleVector.Abs.Dense<U> sparseToDense(DoubleVector.Abs.Sparse<U> in)
U
- Unit; the unit of the parameter and the resultin
- DoubleVector.Abs.Sparse<U>; the Sparse DoubleVectorpublic static <U extends Unit<U>> MutableDoubleVector.Rel.Dense<U> sparseToDense(DoubleVector.Rel.Sparse<U> in)
U
- Unit; the unit of the parameter and the resultin
- DoubleVector.Rel.Sparse<U>; the Sparse DoubleVectorpublic static <U extends Unit<U>> MutableDoubleVector.Abs.Dense<U> interpolate(DoubleVector.Abs.Dense<U> zero, DoubleVector.Abs.Dense<U> one, double ratio) throws ValueException
U
- Unit; the unit of the parameters and the resultzero
- DoubleVector.Abs.Dense<U>; zero reference (returned when ratio == 0)one
- DoubleVector.Abs.Dense<U>; one reference (returned when ratio == 1)ratio
- double; the ratio that determines where between (or outside) zero and one the result liesValueException
- when zero and one do not have the same sizepublic static <U extends Unit<U>> MutableDoubleVector.Rel.Dense<U> interpolate(DoubleVector.Rel.Dense<U> zero, DoubleVector.Rel.Dense<U> one, double ratio) throws ValueException
U
- Unit; the unit of the parameters and the resultzero
- DoubleVector.Rel.Dense<U>; zero reference (returned when ratio == 0)one
- DoubleVector.Rel.Dense<U>; one reference (returned when ratio == 1)ratio
- double; the ratio that determines where between (or outside) zero and one the result liesValueException
- when zero and one do not have the same sizepublic static <U extends Unit<U>> MutableDoubleVector.Abs.Sparse<U> interpolate(DoubleVector.Abs.Sparse<U> zero, DoubleVector.Abs.Sparse<U> one, double ratio) throws ValueException
U
- Unit; the unit of the parameters and the resultzero
- DoubleVector.Abs.Sparse<U>; zero reference (returned when ratio == 0)one
- DoubleVector.Abs.Sparse<U>; one reference (returned when ratio == 1)ratio
- double; the ratio that determines where between (or outside) zero and one the result liesValueException
- when zero and one do not have the same sizepublic static <U extends Unit<U>> MutableDoubleVector.Rel.Sparse<U> interpolate(DoubleVector.Rel.Sparse<U> zero, DoubleVector.Rel.Sparse<U> one, double ratio) throws ValueException
U
- Unit; the unit of the parameters and the resultzero
- DoubleVector.Rel.Sparse<U>; zero reference (returned when ratio == 0)one
- DoubleVector.Rel.Sparse<U>; one reference (returned when ratio == 1)ratio
- double; the ratio that determines where between (or outside) zero and one the result liesValueException
- when zero and one do not have the same sizeCopyright © 2014–2015 Delft University of Technology. All rights reserved.