Class SIMatrix

All Implemented Interfaces:
Serializable, Cloneable, Matrix<SIUnit,​SIScalar,​SIVector,​SIMatrix>, Matrix.Rel<SIUnit,​SIScalar,​SIVector,​SIMatrix>, ValueFunctions<SIUnit,​SIMatrix>, IndexedValue<SIUnit,​SIScalar,​SIMatrix>, Relative<SIUnit,​SIMatrix>, Value<SIUnit,​SIMatrix>, DoubleMatrixInterface<SIUnit,​SIScalar,​SIVector,​SIMatrix>

@Generated(value="org.djunits.generator.GenerateDJUNIT",
           date="2019-10-18T12:12:25.568Z")
public class SIMatrix
extends AbstractDoubleMatrixRel<SIUnit,​SIScalar,​SIVector,​SIMatrix>
Easy access methods for the generic Relative SI DoubleMatrix.

Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands.
All rights reserved.
BSD-style license. See OpenTrafficSim License.

Author:
Alexander Verbraeck, Peter Knoppers
See Also:
Serialized Form
  • Constructor Details

    • SIMatrix

      public SIMatrix​(DoubleMatrixData data, SIUnit unit)
      Parameters:
      data - DoubleMatrixData; an internal data object
      unit - SIUnit; the unit
  • Method Details

    • instantiate

      public static SIMatrix instantiate​(double[][] values, SIUnit unit, StorageType storageType) throws ValueRuntimeException
      Construct a new Relative Double SIMatrix.
      Parameters:
      values - double[][]; the values of the entries in the new Relative Double SIMatrix
      unit - SIUnit; the unit of the new Relative Double SIMatrix
      storageType - StorageType; the data type to use (e.g., DENSE or SPARSE)
      Returns:
      SIMatrix; the SIMatrix of the given unit
      Throws:
      ValueRuntimeException - when values is null
    • getScalarClass

      public Class<SIScalar> getScalarClass()
      Return the class of the corresponding scalar.
      Returns:
      Class<S>; the class of the corresponding scalar
    • getVectorClass

      public Class<SIVector> getVectorClass()
      Return the class of the corresponding vector.
      Returns:
      Class<V>; the class of the corresponding vector
    • of

      public static SIMatrix of​(double[][] values, String unitString, StorageType storageType)
      Returns an SIMatrix based on an array of values and the textual representation of the unit.
      Parameters:
      values - double[][]; the values to use
      unitString - String; the textual representation of the unit
      storageType - StorageType; the storage type to use
      Returns:
      SIMatrix; the matrix representation of the values in their unit
      Throws:
      IllegalArgumentException - when the unit cannot be parsed or is incorrect
      NullPointerException - when the unitString argument is null
    • instantiateMatrix

      public SIMatrix instantiateMatrix​(DoubleMatrixData dmd, SIUnit unit)
      Instantiate a new matrix of the class of this matrix. This can be used instead of the DoubleMatrix.instiantiate() methods in case another matrix of this class is known. The method is faster than DoubleMatrix.instantiate, and it will also work if the matrix is user-defined.
      Parameters:
      dmd - DoubleMatrixData; the data used to instantiate the matrix
      unit - U; the display unit of the matrix
      Returns:
      V; a matrix of the correct type
    • instantiateVector

      public SIVector instantiateVector​(DoubleVectorData dvd, SIUnit unit)
      Instantiate a new vector of the class of this matrix. This can be used instead of the DoubleVector.instiantiate() methods in case another matrix of this class is known. The method is faster than DoubleVector.instantiate, and it will also work if the matrix and/or vector are user-defined.
      Parameters:
      dvd - DoubleVectorData; the data used to instantiate the vector
      unit - U; the display unit of the vector
      Returns:
      V; a vector of the correct type
    • instantiateScalarSI

      public SIScalar instantiateScalarSI​(double valueSI, SIUnit unit)
      Instantiate a new scalar for the class of this matrix. This can be used instead of the DoubleScalar.instiantiate() methods in case a matrix of this class is known. The method is faster than DoubleScalar.instantiate, and it will also work if the matrix and/or scalar are user-defined.
      Parameters:
      valueSI - double; the SI value of the scalar
      unit - U; the unit in which the value will be displayed
      Returns:
      S; a scalar of the correct type, belonging to the matrix type
    • as

      public final <U extends Unit<U>,​ S extends AbstractDoubleScalarRel<U,​ S>,​ V extends AbstractDoubleVectorRel<U,​ S,​ V>,​ M extends AbstractDoubleMatrixRel<U,​ S,​ V,​ M>> M as​(U displayUnit)
      Return the current matrix transformed to a matrix in the given unit. Of course the SI dimensionality has to match, otherwise the matrix cannot be transformed. The compiler will check the alignment between the return value and the unit.
      Type Parameters:
      U - the unit
      S - the corresponding scalar type
      V - the corresponding vector type
      M - the matrix type
      Parameters:
      displayUnit - KU; the unit in which the matrix needs to be expressed
      Returns:
      K; the matrix that has been transformed into the right matrix type and unit
    • asAbsorbedDose

      public final AbsorbedDoseMatrix asAbsorbedDose()
      Return the current matrix as a absorbeddose matrix.
      Returns:
      AbsorbedDoseMatrix; the current matrix as a absorbeddose matrix
    • asAbsorbedDose

      public final AbsorbedDoseMatrix asAbsorbedDose​(AbsorbedDoseUnit displayUnit)
      Return the current matrix as a absorbeddose matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      AbsorbedDoseMatrix; the current matrix as a absorbeddose matrix
    • asAcceleration

      public final AccelerationMatrix asAcceleration()
      Return the current matrix as a acceleration matrix.
      Returns:
      AccelerationMatrix; the current matrix as a acceleration matrix
    • asAcceleration

      public final AccelerationMatrix asAcceleration​(AccelerationUnit displayUnit)
      Return the current matrix as a acceleration matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      AccelerationMatrix; the current matrix as a acceleration matrix
    • asAmountOfSubstance

      public final AmountOfSubstanceMatrix asAmountOfSubstance()
      Return the current matrix as a amountofsubstance matrix.
      Returns:
      AmountOfSubstanceMatrix; the current matrix as a amountofsubstance matrix
    • asAmountOfSubstance

      public final AmountOfSubstanceMatrix asAmountOfSubstance​(AmountOfSubstanceUnit displayUnit)
      Return the current matrix as a amountofsubstance matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      AmountOfSubstanceMatrix; the current matrix as a amountofsubstance matrix
    • asArea

      public final AreaMatrix asArea()
      Return the current matrix as a area matrix.
      Returns:
      AreaMatrix; the current matrix as a area matrix
    • asArea

      public final AreaMatrix asArea​(AreaUnit displayUnit)
      Return the current matrix as a area matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      AreaMatrix; the current matrix as a area matrix
    • asCatalyticActivity

      public final CatalyticActivityMatrix asCatalyticActivity()
      Return the current matrix as a catalyticactivity matrix.
      Returns:
      CatalyticActivityMatrix; the current matrix as a catalyticactivity matrix
    • asCatalyticActivity

      public final CatalyticActivityMatrix asCatalyticActivity​(CatalyticActivityUnit displayUnit)
      Return the current matrix as a catalyticactivity matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      CatalyticActivityMatrix; the current matrix as a catalyticactivity matrix
    • asDensity

      public final DensityMatrix asDensity()
      Return the current matrix as a density matrix.
      Returns:
      DensityMatrix; the current matrix as a density matrix
    • asDensity

      public final DensityMatrix asDensity​(DensityUnit displayUnit)
      Return the current matrix as a density matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      DensityMatrix; the current matrix as a density matrix
    • asDimensionless

      public final DimensionlessMatrix asDimensionless()
      Return the current matrix as a dimensionless matrix.
      Returns:
      DimensionlessMatrix; the current matrix as a dimensionless matrix
    • asDimensionless

      public final DimensionlessMatrix asDimensionless​(DimensionlessUnit displayUnit)
      Return the current matrix as a dimensionless matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      DimensionlessMatrix; the current matrix as a dimensionless matrix
    • asElectricalCapacitance

      public final ElectricalCapacitanceMatrix asElectricalCapacitance()
      Return the current matrix as a electricalcapacitance matrix.
      Returns:
      ElectricalCapacitanceMatrix; the current matrix as a electricalcapacitance matrix
    • asElectricalCapacitance

      public final ElectricalCapacitanceMatrix asElectricalCapacitance​(ElectricalCapacitanceUnit displayUnit)
      Return the current matrix as a electricalcapacitance matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      ElectricalCapacitanceMatrix; the current matrix as a electricalcapacitance matrix
    • asElectricalCharge

      public final ElectricalChargeMatrix asElectricalCharge()
      Return the current matrix as a electricalcharge matrix.
      Returns:
      ElectricalChargeMatrix; the current matrix as a electricalcharge matrix
    • asElectricalCharge

      public final ElectricalChargeMatrix asElectricalCharge​(ElectricalChargeUnit displayUnit)
      Return the current matrix as a electricalcharge matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      ElectricalChargeMatrix; the current matrix as a electricalcharge matrix
    • asElectricalConductance

      public final ElectricalConductanceMatrix asElectricalConductance()
      Return the current matrix as a electricalconductance matrix.
      Returns:
      ElectricalConductanceMatrix; the current matrix as a electricalconductance matrix
    • asElectricalConductance

      public final ElectricalConductanceMatrix asElectricalConductance​(ElectricalConductanceUnit displayUnit)
      Return the current matrix as a electricalconductance matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      ElectricalConductanceMatrix; the current matrix as a electricalconductance matrix
    • asElectricalCurrent

      public final ElectricalCurrentMatrix asElectricalCurrent()
      Return the current matrix as a electricalcurrent matrix.
      Returns:
      ElectricalCurrentMatrix; the current matrix as a electricalcurrent matrix
    • asElectricalCurrent

      public final ElectricalCurrentMatrix asElectricalCurrent​(ElectricalCurrentUnit displayUnit)
      Return the current matrix as a electricalcurrent matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      ElectricalCurrentMatrix; the current matrix as a electricalcurrent matrix
    • asElectricalInductance

      public final ElectricalInductanceMatrix asElectricalInductance()
      Return the current matrix as a electricalinductance matrix.
      Returns:
      ElectricalInductanceMatrix; the current matrix as a electricalinductance matrix
    • asElectricalInductance

      public final ElectricalInductanceMatrix asElectricalInductance​(ElectricalInductanceUnit displayUnit)
      Return the current matrix as a electricalinductance matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      ElectricalInductanceMatrix; the current matrix as a electricalinductance matrix
    • asElectricalPotential

      public final ElectricalPotentialMatrix asElectricalPotential()
      Return the current matrix as a electricalpotential matrix.
      Returns:
      ElectricalPotentialMatrix; the current matrix as a electricalpotential matrix
    • asElectricalPotential

      public final ElectricalPotentialMatrix asElectricalPotential​(ElectricalPotentialUnit displayUnit)
      Return the current matrix as a electricalpotential matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      ElectricalPotentialMatrix; the current matrix as a electricalpotential matrix
    • asElectricalResistance

      public final ElectricalResistanceMatrix asElectricalResistance()
      Return the current matrix as a electricalresistance matrix.
      Returns:
      ElectricalResistanceMatrix; the current matrix as a electricalresistance matrix
    • asElectricalResistance

      public final ElectricalResistanceMatrix asElectricalResistance​(ElectricalResistanceUnit displayUnit)
      Return the current matrix as a electricalresistance matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      ElectricalResistanceMatrix; the current matrix as a electricalresistance matrix
    • asEnergy

      public final EnergyMatrix asEnergy()
      Return the current matrix as a energy matrix.
      Returns:
      EnergyMatrix; the current matrix as a energy matrix
    • asEnergy

      public final EnergyMatrix asEnergy​(EnergyUnit displayUnit)
      Return the current matrix as a energy matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      EnergyMatrix; the current matrix as a energy matrix
    • asEquivalentDose

      public final EquivalentDoseMatrix asEquivalentDose()
      Return the current matrix as a equivalentdose matrix.
      Returns:
      EquivalentDoseMatrix; the current matrix as a equivalentdose matrix
    • asEquivalentDose

      public final EquivalentDoseMatrix asEquivalentDose​(EquivalentDoseUnit displayUnit)
      Return the current matrix as a equivalentdose matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      EquivalentDoseMatrix; the current matrix as a equivalentdose matrix
    • asFlowMass

      public final FlowMassMatrix asFlowMass()
      Return the current matrix as a flowmass matrix.
      Returns:
      FlowMassMatrix; the current matrix as a flowmass matrix
    • asFlowMass

      public final FlowMassMatrix asFlowMass​(FlowMassUnit displayUnit)
      Return the current matrix as a flowmass matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FlowMassMatrix; the current matrix as a flowmass matrix
    • asFlowVolume

      public final FlowVolumeMatrix asFlowVolume()
      Return the current matrix as a flowvolume matrix.
      Returns:
      FlowVolumeMatrix; the current matrix as a flowvolume matrix
    • asFlowVolume

      public final FlowVolumeMatrix asFlowVolume​(FlowVolumeUnit displayUnit)
      Return the current matrix as a flowvolume matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FlowVolumeMatrix; the current matrix as a flowvolume matrix
    • asForce

      public final ForceMatrix asForce()
      Return the current matrix as a force matrix.
      Returns:
      ForceMatrix; the current matrix as a force matrix
    • asForce

      public final ForceMatrix asForce​(ForceUnit displayUnit)
      Return the current matrix as a force matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      ForceMatrix; the current matrix as a force matrix
    • asFrequency

      public final FrequencyMatrix asFrequency()
      Return the current matrix as a frequency matrix.
      Returns:
      FrequencyMatrix; the current matrix as a frequency matrix
    • asFrequency

      public final FrequencyMatrix asFrequency​(FrequencyUnit displayUnit)
      Return the current matrix as a frequency matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FrequencyMatrix; the current matrix as a frequency matrix
    • asIlluminance

      public final IlluminanceMatrix asIlluminance()
      Return the current matrix as a illuminance matrix.
      Returns:
      IlluminanceMatrix; the current matrix as a illuminance matrix
    • asIlluminance

      public final IlluminanceMatrix asIlluminance​(IlluminanceUnit displayUnit)
      Return the current matrix as a illuminance matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      IlluminanceMatrix; the current matrix as a illuminance matrix
    • asLinearDensity

      public final LinearDensityMatrix asLinearDensity()
      Return the current matrix as a lineardensity matrix.
      Returns:
      LinearDensityMatrix; the current matrix as a lineardensity matrix
    • asLinearDensity

      public final LinearDensityMatrix asLinearDensity​(LinearDensityUnit displayUnit)
      Return the current matrix as a lineardensity matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      LinearDensityMatrix; the current matrix as a lineardensity matrix
    • asLuminousFlux

      public final LuminousFluxMatrix asLuminousFlux()
      Return the current matrix as a luminousflux matrix.
      Returns:
      LuminousFluxMatrix; the current matrix as a luminousflux matrix
    • asLuminousFlux

      public final LuminousFluxMatrix asLuminousFlux​(LuminousFluxUnit displayUnit)
      Return the current matrix as a luminousflux matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      LuminousFluxMatrix; the current matrix as a luminousflux matrix
    • asLuminousIntensity

      public final LuminousIntensityMatrix asLuminousIntensity()
      Return the current matrix as a luminousintensity matrix.
      Returns:
      LuminousIntensityMatrix; the current matrix as a luminousintensity matrix
    • asLuminousIntensity

      public final LuminousIntensityMatrix asLuminousIntensity​(LuminousIntensityUnit displayUnit)
      Return the current matrix as a luminousintensity matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      LuminousIntensityMatrix; the current matrix as a luminousintensity matrix
    • asMagneticFluxDensity

      public final MagneticFluxDensityMatrix asMagneticFluxDensity()
      Return the current matrix as a magneticfluxdensity matrix.
      Returns:
      MagneticFluxDensityMatrix; the current matrix as a magneticfluxdensity matrix
    • asMagneticFluxDensity

      public final MagneticFluxDensityMatrix asMagneticFluxDensity​(MagneticFluxDensityUnit displayUnit)
      Return the current matrix as a magneticfluxdensity matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      MagneticFluxDensityMatrix; the current matrix as a magneticfluxdensity matrix
    • asMagneticFlux

      public final MagneticFluxMatrix asMagneticFlux()
      Return the current matrix as a magneticflux matrix.
      Returns:
      MagneticFluxMatrix; the current matrix as a magneticflux matrix
    • asMagneticFlux

      public final MagneticFluxMatrix asMagneticFlux​(MagneticFluxUnit displayUnit)
      Return the current matrix as a magneticflux matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      MagneticFluxMatrix; the current matrix as a magneticflux matrix
    • asMass

      public final MassMatrix asMass()
      Return the current matrix as a mass matrix.
      Returns:
      MassMatrix; the current matrix as a mass matrix
    • asMass

      public final MassMatrix asMass​(MassUnit displayUnit)
      Return the current matrix as a mass matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      MassMatrix; the current matrix as a mass matrix
    • asPower

      public final PowerMatrix asPower()
      Return the current matrix as a power matrix.
      Returns:
      PowerMatrix; the current matrix as a power matrix
    • asPower

      public final PowerMatrix asPower​(PowerUnit displayUnit)
      Return the current matrix as a power matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      PowerMatrix; the current matrix as a power matrix
    • asPressure

      public final PressureMatrix asPressure()
      Return the current matrix as a pressure matrix.
      Returns:
      PressureMatrix; the current matrix as a pressure matrix
    • asPressure

      public final PressureMatrix asPressure​(PressureUnit displayUnit)
      Return the current matrix as a pressure matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      PressureMatrix; the current matrix as a pressure matrix
    • asRadioActivity

      public final RadioActivityMatrix asRadioActivity()
      Return the current matrix as a radioactivity matrix.
      Returns:
      RadioActivityMatrix; the current matrix as a radioactivity matrix
    • asRadioActivity

      public final RadioActivityMatrix asRadioActivity​(RadioActivityUnit displayUnit)
      Return the current matrix as a radioactivity matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      RadioActivityMatrix; the current matrix as a radioactivity matrix
    • asSolidAngle

      public final SolidAngleMatrix asSolidAngle()
      Return the current matrix as a solidangle matrix.
      Returns:
      SolidAngleMatrix; the current matrix as a solidangle matrix
    • asSolidAngle

      public final SolidAngleMatrix asSolidAngle​(SolidAngleUnit displayUnit)
      Return the current matrix as a solidangle matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      SolidAngleMatrix; the current matrix as a solidangle matrix
    • asSpeed

      public final SpeedMatrix asSpeed()
      Return the current matrix as a speed matrix.
      Returns:
      SpeedMatrix; the current matrix as a speed matrix
    • asSpeed

      public final SpeedMatrix asSpeed​(SpeedUnit displayUnit)
      Return the current matrix as a speed matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      SpeedMatrix; the current matrix as a speed matrix
    • asTorque

      public final TorqueMatrix asTorque()
      Return the current matrix as a torque matrix.
      Returns:
      TorqueMatrix; the current matrix as a torque matrix
    • asTorque

      public final TorqueMatrix asTorque​(TorqueUnit displayUnit)
      Return the current matrix as a torque matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      TorqueMatrix; the current matrix as a torque matrix
    • asVolume

      public final VolumeMatrix asVolume()
      Return the current matrix as a volume matrix.
      Returns:
      VolumeMatrix; the current matrix as a volume matrix
    • asVolume

      public final VolumeMatrix asVolume​(VolumeUnit displayUnit)
      Return the current matrix as a volume matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      VolumeMatrix; the current matrix as a volume matrix
    • asAngle

      public final AngleMatrix asAngle()
      Return the current matrix as a angle matrix.
      Returns:
      AngleMatrix; the current matrix as a angle matrix
    • asAngle

      public final AngleMatrix asAngle​(AngleUnit displayUnit)
      Return the current matrix as a angle matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      AngleMatrix; the current matrix as a angle matrix
    • asLength

      public final LengthMatrix asLength()
      Return the current matrix as a length matrix.
      Returns:
      LengthMatrix; the current matrix as a length matrix
    • asLength

      public final LengthMatrix asLength​(LengthUnit displayUnit)
      Return the current matrix as a length matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      LengthMatrix; the current matrix as a length matrix
    • asTemperature

      public final TemperatureMatrix asTemperature()
      Return the current matrix as a temperature matrix.
      Returns:
      TemperatureMatrix; the current matrix as a temperature matrix
    • asTemperature

      public final TemperatureMatrix asTemperature​(TemperatureUnit displayUnit)
      Return the current matrix as a temperature matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      TemperatureMatrix; the current matrix as a temperature matrix
    • asDuration

      public final DurationMatrix asDuration()
      Return the current matrix as a duration matrix.
      Returns:
      DurationMatrix; the current matrix as a duration matrix
    • asDuration

      public final DurationMatrix asDuration​(DurationUnit displayUnit)
      Return the current matrix as a duration matrix, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      DurationMatrix; the current matrix as a duration matrix