Package org.djunits.value.base
Interface Matrix.RelWithAbs<AU extends AbsoluteLinearUnit<AU,RU>,A extends Scalar<AU,A>,AV extends Vector.Abs<AU,A,AV,RU,R,RV>,AM extends Matrix.Abs<AU,A,AV,AM,RU,R,RV,RM>,RU extends Unit<RU>,R extends Scalar<RU,R>,RV extends Vector.RelWithAbs<AU,A,AV,RU,R,RV>,RM extends Matrix.RelWithAbs<AU,A,AV,AM,RU,R,RV,RM>>
-
- Type Parameters:
AU
- the absolute unit belonging to the relative unitA
- the absolute scalar type belonging to the absolute matrix typeAV
- the corresponding absolute vector typeAM
- the absolute matrix typeRU
- the relative unit belonging to the absolute unitR
- the relative scalar type belonging to the relative matrix typeRV
- the corresponding relative vector typeRM
- the relative matrix type with this unit
- All Superinterfaces:
Cloneable
,IndexedValue<RU,R,RM>
,Matrix<RU,R,RV,RM>
,Matrix.Rel<RU,R,RV,RM>
,Relative<RU,RM>
,Serializable
,Value<RU,RM>
,ValueFunctions<RU,RM>
- All Known Implementing Classes:
AbstractDoubleMatrixRelWithAbs
,AbstractFloatMatrixRelWithAbs
,AngleMatrix
,DurationMatrix
,FloatAngleMatrix
,FloatDurationMatrix
,FloatLengthMatrix
,FloatTemperatureMatrix
,LengthMatrix
,TemperatureMatrix
- Enclosing interface:
- Matrix<U extends Unit<U>,S extends Scalar<U,S>,V extends Vector<U,S,V>,M extends Matrix<U,S,V,M>>
public static interface Matrix.RelWithAbs<AU extends AbsoluteLinearUnit<AU,RU>,A extends Scalar<AU,A>,AV extends Vector.Abs<AU,A,AV,RU,R,RV>,AM extends Matrix.Abs<AU,A,AV,AM,RU,R,RV,RM>,RU extends Unit<RU>,R extends Scalar<RU,R>,RV extends Vector.RelWithAbs<AU,A,AV,RU,R,RV>,RM extends Matrix.RelWithAbs<AU,A,AV,AM,RU,R,RV,RM>> extends Matrix.Rel<RU,R,RV,RM>
Additional methods for Relative Matrix that has a corresponding Absolute Matrix. An example is the relative matrix Length that has a corresponding absolute matrix Position. A possible way to implement this interface is:class LengthMatrix implements Matrix.RelWithAbs< PositionUnit, Position, PositionMatrix, LengthUnit, Length, LengthMatrix>
Copyright (c) 2019-2023 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUNITS License.- Author:
- Alexander Verbraeck
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.djunits.value.base.Matrix
Matrix.Abs<AU extends AbsoluteLinearUnit<AU,RU>,A extends Scalar<AU,A>,AV extends Vector.Abs<AU,A,AV,RU,R,RV>,AM extends Matrix.Abs<AU,A,AV,AM,RU,R,RV,RM>,RU extends Unit<RU>,R extends Scalar<RU,R>,RV extends Vector.RelWithAbs<AU,A,AV,RU,R,RV>,RM extends Matrix.RelWithAbs<AU,A,AV,AM,RU,R,RV,RM>>, Matrix.Rel<U extends Unit<U>,S extends Scalar<U,S>,V extends Vector<U,S,V>,RM extends Matrix.Rel<U,S,V,RM>>, Matrix.RelWithAbs<AU extends AbsoluteLinearUnit<AU,RU>,A extends Scalar<AU,A>,AV extends Vector.Abs<AU,A,AV,RU,R,RV>,AM extends Matrix.Abs<AU,A,AV,AM,RU,R,RV,RM>,RU extends Unit<RU>,R extends Scalar<RU,R>,RV extends Vector.RelWithAbs<AU,A,AV,RU,R,RV>,RM extends Matrix.RelWithAbs<AU,A,AV,AM,RU,R,RV,RM>>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AM
plus(AM increment)
Add an absolute matrix to this relative matrix.-
Methods inherited from interface org.djunits.value.IndexedValue
cardinality, getScalarClass, getStorageType, immutable, isDense, isMutable, isSparse, mutable, toDense, toSparse
-
Methods inherited from interface org.djunits.value.base.Matrix
cols, get, getColumn, getColumnScalars, getDiagonal, getDiagonalScalars, getRow, getRowScalars, getScalars, getVectorClass, rows
-
Methods inherited from interface org.djunits.value.base.Matrix.Rel
divideBy, minus, multiplyBy, plus
-
Methods inherited from interface org.djunits.value.Value
getDisplayUnit, isAbsolute, isRelative, setDisplayUnit, toString, toString, toString, toString
-
-
-
-
Method Detail
-
plus
AM plus(AM increment)
Add an absolute matrix to this relative matrix. A new matrix is returned. When the matrix itself needs to be changed, use the increaseBy(V) method instead. The addition is done value by value and the result is stored in a new matrix. If both operands are sparse, the result is a sparse matrix, otherwise the result is a dense matrix.- Parameters:
increment
- AM; the absolute matrix (mutable or immutable, sparse or dense) to add to this relative matrix- Returns:
- AMV; the sum of this matrix and the operand as a new absolute, mutable matrix
- Throws:
ValueRuntimeException
- in case this matrix and the operand have a different size
-
-