U
- Unit; the unit of this MutableDoubleVectorpublic abstract class MutableDoubleVector<U extends Unit<U>> extends DoubleVector<U> implements WriteDoubleVectorFunctions<U>, DoubleMathFunctions<MutableDoubleVector<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 |
MutableDoubleVector.Abs<U extends Unit<U>> |
static class |
MutableDoubleVector.Rel<U extends Unit<U>> |
Modifier | Constructor and Description |
---|---|
protected |
MutableDoubleVector(U unit)
Construct a new MutableDoubleVector.
|
Modifier and Type | Method and Description |
---|---|
void |
assign(cern.colt.function.tdouble.DoubleFunction d)
Execute a function on a cell by cell basis.
|
protected void |
checkCopyOnWrite()
Check the copyOnWrite flag and, if it is set, make a deep copy of the data and clear the flag.
|
protected MutableDoubleVector.Rel<U> |
decrementBy(DoubleVector.Abs<U> abs)
Decrement the values in this Relative MutableDoubleVector by the corresponding values in an Absolute
DoubleVector.
|
protected MutableDoubleVector<U> |
decrementByImpl(DoubleVector.Rel<U> rel)
Decrement the corresponding values of this Relative DoubleVector from the values of this MutableDoubleVector.
|
MutableDoubleVector<U> |
divide(double constant)
Scale the value(s) by the inverse of a factor; i.e.
|
abstract DoubleVector<U> |
immutable()
Make (immutable) DoubleVector equivalent for any type of MutableDoubleVector.
|
protected MutableDoubleVector<U> |
incrementByImpl(DoubleVector.Rel<U> rel)
Increment the values in this MutableDoubleVector by the corresponding values in a Relative DoubleVector.
|
MutableDoubleVector<U> |
multiply(double constant)
Scale the value(s) by a factor.
|
void |
normalize()
Normalize the vector, i.e.
|
protected MutableDoubleVector<U> |
scaleValueByValue(double[] factor)
Scale the values in this MutableDoubleVector by the corresponding values in a double array.
|
protected void |
scaleValueByValue(DoubleVector<?> factor)
Scale the values in this MutableDoubleVector by the corresponding values in a DoubleVector.
|
void |
set(int index,
DoubleScalar<U> value)
Replace the value at index by the supplied value which is in a compatible unit.
|
void |
setInUnit(int index,
double value,
U valueUnit)
Replace the value at index by the supplied value which is expressed in a supplied (compatible) unit.
|
void |
setSI(int index,
double valueSI)
Replace the value at index by the supplied value which is expressed in the standard SI unit.
|
cardinality, checkIndex, checkNonEmpty, checkSize, checkSize, createMatrix1D, deepCopyData, deepCopyOfData, denseToSparse, denseToSparse, equals, getInUnit, getInUnit, getSI, getValuesInUnit, getValuesInUnit, getValuesSI, getVectorSI, hashCode, initialize, initialize, initialize, interpolate, interpolate, interpolate, interpolate, minus, minus, minus, minus, minus, minus, minus, minus, minus, mutable, plus, plus, plus, plus, plus, plus, safeGet, safeSet, size, sparseToDense, sparseToDense, times, times, times, times, times, times, times, times, times, times, toString, toString, toString, toString, zSum
expressAsSIUnit, expressAsSpecifiedUnit, getUnit, isAbsolute, isRelative
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
abs, acos, asin, atan, cbrt, ceil, cos, cosh, exp, expm1, floor, inv, log, log10, log1p, pow, rint, round, signum, sin, sinh, sqrt, tan, tanh, toDegrees, toRadians
get
protected MutableDoubleVector(U unit)
unit
- U; the unit of the new MutableDoubleVectorpublic final void normalize() throws ValueException
normalize
in interface WriteDoubleVectorFunctions<U extends Unit<U>>
ValueException
- when the sum of the values is zero and normalization is not possiblepublic abstract DoubleVector<U> immutable()
protected final void checkCopyOnWrite()
public final void setSI(int index, double valueSI) throws ValueException
setSI
in interface WriteDoubleVectorFunctions<U extends Unit<U>>
index
- int; index of the value to replacevalueSI
- double; the value to store (expressed in the standard SI unit)ValueException
- when index out of range (index < 0 or index >= size())public final void set(int index, DoubleScalar<U> value) throws ValueException
set
in interface WriteDoubleVectorFunctions<U extends Unit<U>>
index
- int; index of the value to replacevalue
- DoubleScalar<U>; the strongly typed value to storeValueException
- when index out of range (index < 0 or index >= size())public final void setInUnit(int index, double value, U valueUnit) throws ValueException
setInUnit
in interface WriteDoubleVectorFunctions<U extends Unit<U>>
index
- int; index of the value to replacevalue
- double; 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())public final void assign(cern.colt.function.tdouble.DoubleFunction d)
d
- cern.colt.function.tdouble.DoubleFunction; the function to applypublic final MutableDoubleVector<U> multiply(double constant)
multiply
in interface DoubleMathFunctions<MutableDoubleVector<U extends Unit<U>>>
constant
- double; the multiplierpublic final MutableDoubleVector<U> divide(double constant)
divide
in interface DoubleMathFunctions<MutableDoubleVector<U extends Unit<U>>>
constant
- double; the divisorprotected final MutableDoubleVector<U> incrementByImpl(DoubleVector.Rel<U> rel) throws ValueException
rel
- DoubleVector.Rel<U>; the Relative DoubleVectorValueException
- when the vectors do not have the same sizeprotected final MutableDoubleVector<U> decrementByImpl(DoubleVector.Rel<U> rel) throws ValueException
rel
- DoubleVector.Rel<U>; the Relative DoubleVectorValueException
- when the vectors do not have the same sizeprotected final MutableDoubleVector.Rel<U> decrementBy(DoubleVector.Abs<U> abs) throws ValueException
abs
- DoubleVector.Abs<U>; the Absolute DoubleVectorValueException
- when the vectors do not have the same sizeprotected final void scaleValueByValue(DoubleVector<?> factor) throws ValueException
factor
- DoubleVector<?>; contains the values by which to scale the corresponding values in this
MutableDoubleVectorValueException
- when the vectors do not have the same sizeprotected final MutableDoubleVector<U> scaleValueByValue(double[] factor) throws ValueException
factor
- double[]; contains the values by which to scale the corresponding values in this
MutableDoubleVectorValueException
- when the vector and the array do not have the same sizeCopyright © 2014–2015 Delft University of Technology. All rights reserved.