Package org.djunits.value.base
Interface 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>>
- Type Parameters:
U
- the unitS
- the scalar type belonging to the matrix typeV
- the corresponding vector typeRM
- the relative matrix type with this unit
- All Superinterfaces:
Cloneable
,IndexedValue<U,S,RM>
,Matrix<U,S,V,RM>
,Relative<U,RM>
,Serializable
,Value<U,RM>
,ValueFunctions<U,RM>
- All Known Subinterfaces:
Matrix.RelWithAbs<AU,A,AV,AM,RU,R,RV,RM>
- All Known Implementing Classes:
AbsorbedDoseMatrix
,AbstractDoubleMatrixRel
,AbstractDoubleMatrixRelWithAbs
,AbstractFloatMatrixRel
,AbstractFloatMatrixRelWithAbs
,AccelerationMatrix
,AmountOfSubstanceMatrix
,AngleMatrix
,AngularAccelerationMatrix
,AngularVelocityMatrix
,AreaMatrix
,CatalyticActivityMatrix
,DensityMatrix
,DimensionlessMatrix
,DurationMatrix
,ElectricalCapacitanceMatrix
,ElectricalChargeMatrix
,ElectricalConductanceMatrix
,ElectricalCurrentMatrix
,ElectricalInductanceMatrix
,ElectricalPotentialMatrix
,ElectricalResistanceMatrix
,EnergyMatrix
,EquivalentDoseMatrix
,FloatAbsorbedDoseMatrix
,FloatAccelerationMatrix
,FloatAmountOfSubstanceMatrix
,FloatAngleMatrix
,FloatAngularAccelerationMatrix
,FloatAngularVelocityMatrix
,FloatAreaMatrix
,FloatCatalyticActivityMatrix
,FloatDensityMatrix
,FloatDimensionlessMatrix
,FloatDurationMatrix
,FloatElectricalCapacitanceMatrix
,FloatElectricalChargeMatrix
,FloatElectricalConductanceMatrix
,FloatElectricalCurrentMatrix
,FloatElectricalInductanceMatrix
,FloatElectricalPotentialMatrix
,FloatElectricalResistanceMatrix
,FloatEnergyMatrix
,FloatEquivalentDoseMatrix
,FloatFlowMassMatrix
,FloatFlowVolumeMatrix
,FloatForceMatrix
,FloatFrequencyMatrix
,FloatIlluminanceMatrix
,FloatLengthMatrix
,FloatLinearDensityMatrix
,FloatLuminousFluxMatrix
,FloatLuminousIntensityMatrix
,FloatMagneticFluxDensityMatrix
,FloatMagneticFluxMatrix
,FloatMassMatrix
,FloatMomentumMatrix
,FloatPowerMatrix
,FloatPressureMatrix
,FloatRadioActivityMatrix
,FloatSIMatrix
,FloatSolidAngleMatrix
,FloatSpeedMatrix
,FloatTemperatureMatrix
,FloatTorqueMatrix
,FloatVolumeMatrix
,FlowMassMatrix
,FlowVolumeMatrix
,ForceMatrix
,FrequencyMatrix
,IlluminanceMatrix
,LengthMatrix
,LinearDensityMatrix
,LuminousFluxMatrix
,LuminousIntensityMatrix
,MagneticFluxDensityMatrix
,MagneticFluxMatrix
,MassMatrix
,MomentumMatrix
,PowerMatrix
,PressureMatrix
,RadioActivityMatrix
,SIMatrix
,SolidAngleMatrix
,SpeedMatrix
,TemperatureMatrix
,TorqueMatrix
,VolumeMatrix
- 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.Rel<U extends Unit<U>,S extends Scalar<U,S>,V extends Vector<U,S,V>,RM extends Matrix.Rel<U,S,V,RM>> extends Matrix<U,S,V,RM>, Relative<U,RM>
Methods for Relative Matrix. A possible way to implement this interface is:
BSD-style license. See DJUNITS License.
class AreaMatrix implements Matrix.Rel<AreaUnit, Area, AreaMatrix>Copyright (c) 2019-2020 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
Modifier and Type Method Description RM
divideBy(double divisor)
Divide all values of this matrix by the divisor.RM
minus(RM decrement)
Subtract a relative matrix from this relative mutable matrix.RM
multiplyBy(double multiplier)
Multiply all values of this matrix by the multiplier.RM
plus(RM increment)
Add a relative matrix to this relative mutable 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.Value
getDisplayUnit, isAbsolute, isRelative, setDisplayUnit, toString, toString, toString, toString
-
Method Details
-
plus
Add a relative matrix to this relative mutable matrix. A new matrix is returned. The display unit of the result is the display unit of this relative matrix. 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
- RM; the relative matrix (mutable or immutable, sparse or dense) to add- Returns:
- RMV; the sum of this matrix and the operand as a new relative, mutable matrix
- Throws:
ValueRuntimeException
- in case this matrix and the operand have a different size
-
minus
Subtract a relative matrix from this relative mutable matrix. The display unit of the result is the display unit of this relative matrix. The subtraction 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:
decrement
- RM; the value to subtract- Returns:
- RMV; the difference of this matrix and the operand as a new relative, mutable matrix
- Throws:
ValueRuntimeException
- in case this matrix and the operand have a different size
-
multiplyBy
Multiply all values of this matrix by the multiplier. This only works if the matrix is mutable.- Parameters:
multiplier
- double; the factor by which to multiply all values- Returns:
- V; this modified matrix
- Throws:
ValueRuntimeException
- in case the matrix is immutable
-
divideBy
Divide all values of this matrix by the divisor. This only works if the matrix is mutable.- Parameters:
divisor
- double; the value by which to divide all values- Returns:
- V; this modified matrix
- Throws:
ValueRuntimeException
- in case the matrix is immutable
-