U - Unit; the unit of this MutableFloatVectorpublic abstract class MutableFloatVector<U extends Unit<U>> extends FloatVector<U> implements MutableFloatVectorInterface<U>
This file was generated by the djunits value classes generator, 26 jun, 2015
Copyright (c) 2015 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUNITS License.
$LastChangedDate: 2015-10-07 11:49:36 +0200 (Wed, 07 Oct 2015) $, @version $Revision: 92 $, by $Author: averbraeck $, initial
version 30 Oct, 2015
| Modifier and Type | Class and Description |
|---|---|
static class |
MutableFloatVector.Abs<U extends Unit<U>> |
static class |
MutableFloatVector.Rel<U extends Unit<U>> |
data| Modifier | Constructor and Description |
|---|---|
protected |
MutableFloatVector(U unit)
Construct a new MutableFloatVector.
|
| Modifier and Type | Method and Description |
|---|---|
void |
assign(FloatFunction floatFunction)
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 MutableFloatVector<U> |
decrementByImpl(FloatVector.Rel<U> rel)
Decrement the corresponding values of this Relative FloatVector from the values of this MutableFloatVector.
|
protected MutableFloatVector<U> |
incrementByImpl(FloatVector.Rel<U> rel)
Increment the values in this MutableFloatVector by the corresponding values in a Relative FloatVector.
|
void |
normalize()
Normalize the vector, i.e.
|
protected MutableFloatVector<U> |
scaleValueByValue(float[] factor)
Scale the values in this MutableFloatVector by the corresponding values in a float array.
|
protected void |
scaleValueByValue(FloatVector<?> factor)
Scale the values in this MutableFloatVector by the corresponding values in a FloatVector.
|
void |
set(int index,
FloatScalar<U> value)
Replace the value at index by the supplied value which is in a compatible unit.
|
void |
setInUnit(int index,
float value,
U valueUnit)
Replace the value at index by the supplied value which is expressed in a supplied (compatible) unit.
|
void |
setSI(int index,
float valueSI)
Replace the value at index by the supplied value which is expressed in the standard SI unit.
|
cardinality, checkIndex, checkSize, checkSize, equals, getData, getInUnit, getInUnit, getSI, getValuesInUnit, getValuesInUnit, getValuesSI, hashCode, initializeSparse, initializeSparseMA, initializeSparseMR, safeGet, safeSet, size, toString, toString, toString, toString, zSumexpressAsSIUnit, expressAsSpecifiedUnit, getUnit, isAbsolute, isRelativeclone, finalize, getClass, notify, notifyAll, wait, wait, waitcopy, immutable, toDense, toSparsecardinality, get, getInUnit, getInUnit, getSI, getValuesInUnit, getValuesInUnit, getValuesSI, mutable, size, toString, toString, toString, toString, zSumprotected MutableFloatVector(U unit)
unit - U; the unit of the new MutableFloatVectorprotected final void checkCopyOnWrite()
public final void setSI(int index,
float valueSI)
throws ValueException
setSI in interface MutableFloatVectorInterface<U extends Unit<U>>index - int; index of the value to replacevalueSI - float; 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,
FloatScalar<U> value)
throws ValueException
set in interface MutableFloatVectorInterface<U extends Unit<U>>index - int; index of the value to replacevalue - FloatScalar<U>; the strongly typed value to storeValueException - when index out of range (index < 0 or index >= size())public final void setInUnit(int index,
float value,
U valueUnit)
throws ValueException
setInUnit in interface MutableFloatVectorInterface<U extends Unit<U>>index - int; index of the value to replacevalue - float; 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(FloatFunction floatFunction)
floatFunction - the function to applyprotected final MutableFloatVector<U> incrementByImpl(FloatVector.Rel<U> rel) throws ValueException
rel - FloatVector.Rel<U>; the Relative FloatVectorValueException - when the vectors do not have the same sizeprotected final MutableFloatVector<U> decrementByImpl(FloatVector.Rel<U> rel) throws ValueException
rel - FloatVector.Rel<U>; the Relative FloatVectorValueException - when the vectors do not have the same sizeprotected final void scaleValueByValue(FloatVector<?> factor) throws ValueException
factor - FloatVector<?>; contains the values by which to scale the corresponding values in this
MutableFloatVectorValueException - when the vectors do not have the same sizeprotected final MutableFloatVector<U> scaleValueByValue(float[] factor) throws ValueException
factor - float[]; contains the values by which to scale the corresponding values in this MutableFloatVectorValueException - when the vector and the array do not have the same sizepublic final void normalize()
throws ValueException
normalize in interface MutableFloatVectorInterface<U extends Unit<U>>ValueException - when the sum of the values is zero and normalization is not possibleCopyright © 2015 Delft University of Technology. All rights reserved.