Interface ValueFunctions<U extends Unit<U>,​T extends Value<U,​T>>

Type Parameters:
U - the unit of the values
T - the type of the value that the functions operate on
All Superinterfaces:
Serializable
All Known Subinterfaces:
DoubleMatrixInterface<U,​S,​V,​M>, DoubleScalarInterface<U,​S>, DoubleScalarInterface.Abs<AU,​A,​RU,​R>, DoubleScalarInterface.Rel<U,​R>, DoubleScalarInterface.RelWithAbs<AU,​A,​RU,​R>, DoubleVectorInterface<U,​S,​V>, FloatMatrixInterface<U,​S,​V,​M>, FloatScalarInterface<U,​S>, FloatScalarInterface.Abs<AU,​A,​RU,​R>, FloatScalarInterface.Rel<U,​R>, FloatScalarInterface.RelWithAbs<AU,​A,​RU,​R>, FloatVectorInterface<U,​S,​V>, IndexedValue<U,​S,​T>, Matrix<U,​S,​V,​M>, Matrix.Abs<AU,​A,​AV,​AM,​RU,​R,​RV,​RM>, Matrix.Rel<U,​S,​V,​RM>, Matrix.RelWithAbs<AU,​A,​AV,​AM,​RU,​R,​RV,​RM>, Scalar<U,​S>, Scalar.Abs<AU,​A,​RU,​R>, Scalar.Rel<U,​R>, Scalar.RelWithAbs<AU,​A,​RU,​R>, Value<U,​T>, Vector<U,​S,​V>, Vector.Abs<AU,​A,​AV,​RU,​R,​RV>, Vector.Rel<U,​S,​RV>, Vector.RelWithAbs<AU,​A,​AV,​RU,​R,​RV>
All Known Implementing Classes:
AbsoluteTemperature, AbsoluteTemperatureMatrix, AbsoluteTemperatureVector, AbsorbedDose, AbsorbedDoseMatrix, AbsorbedDoseVector, AbstractDoubleMatrix, AbstractDoubleMatrixAbs, AbstractDoubleMatrixRel, AbstractDoubleMatrixRelWithAbs, AbstractDoubleScalar, AbstractDoubleScalarAbs, AbstractDoubleScalarRel, AbstractDoubleScalarRelWithAbs, AbstractDoubleVector, AbstractDoubleVectorAbs, AbstractDoubleVectorRel, AbstractDoubleVectorRelWithAbs, AbstractFloatMatrix, AbstractFloatMatrixAbs, AbstractFloatMatrixRel, AbstractFloatMatrixRelWithAbs, AbstractFloatScalar, AbstractFloatScalarAbs, AbstractFloatScalarRel, AbstractFloatScalarRelWithAbs, AbstractFloatVector, AbstractFloatVectorAbs, AbstractFloatVectorRel, AbstractFloatVectorRelWithAbs, AbstractIndexedValue, AbstractScalar, AbstractValue, Acceleration, AccelerationMatrix, AccelerationVector, AmountOfSubstance, AmountOfSubstanceMatrix, AmountOfSubstanceVector, Angle, AngleMatrix, AngleVector, Area, AreaMatrix, AreaVector, CatalyticActivity, CatalyticActivityMatrix, CatalyticActivityVector, Density, DensityMatrix, DensityVector, Dimensionless, DimensionlessMatrix, DimensionlessVector, Direction, DirectionMatrix, DirectionVector, Duration, DurationMatrix, DurationVector, ElectricalCapacitance, ElectricalCapacitanceMatrix, ElectricalCapacitanceVector, ElectricalCharge, ElectricalChargeMatrix, ElectricalChargeVector, ElectricalConductance, ElectricalConductanceMatrix, ElectricalConductanceVector, ElectricalCurrent, ElectricalCurrentMatrix, ElectricalCurrentVector, ElectricalInductance, ElectricalInductanceMatrix, ElectricalInductanceVector, ElectricalPotential, ElectricalPotentialMatrix, ElectricalPotentialVector, ElectricalResistance, ElectricalResistanceMatrix, ElectricalResistanceVector, Energy, EnergyMatrix, EnergyVector, EquivalentDose, EquivalentDoseMatrix, EquivalentDoseVector, FloatAbsoluteTemperature, FloatAbsoluteTemperatureMatrix, FloatAbsoluteTemperatureVector, FloatAbsorbedDose, FloatAbsorbedDoseMatrix, FloatAbsorbedDoseVector, FloatAcceleration, FloatAccelerationMatrix, FloatAccelerationVector, FloatAmountOfSubstance, FloatAmountOfSubstanceMatrix, FloatAmountOfSubstanceVector, FloatAngle, FloatAngleMatrix, FloatAngleVector, FloatArea, FloatAreaMatrix, FloatAreaVector, FloatCatalyticActivity, FloatCatalyticActivityMatrix, FloatCatalyticActivityVector, FloatDensity, FloatDensityMatrix, FloatDensityVector, FloatDimensionless, FloatDimensionlessMatrix, FloatDimensionlessVector, FloatDirection, FloatDirectionMatrix, FloatDirectionVector, FloatDuration, FloatDurationMatrix, FloatDurationVector, FloatElectricalCapacitance, FloatElectricalCapacitanceMatrix, FloatElectricalCapacitanceVector, FloatElectricalCharge, FloatElectricalChargeMatrix, FloatElectricalChargeVector, FloatElectricalConductance, FloatElectricalConductanceMatrix, FloatElectricalConductanceVector, FloatElectricalCurrent, FloatElectricalCurrentMatrix, FloatElectricalCurrentVector, FloatElectricalInductance, FloatElectricalInductanceMatrix, FloatElectricalInductanceVector, FloatElectricalPotential, FloatElectricalPotentialMatrix, FloatElectricalPotentialVector, FloatElectricalResistance, FloatElectricalResistanceMatrix, FloatElectricalResistanceVector, FloatEnergy, FloatEnergyMatrix, FloatEnergyVector, FloatEquivalentDose, FloatEquivalentDoseMatrix, FloatEquivalentDoseVector, FloatFlowMass, FloatFlowMassMatrix, FloatFlowMassVector, FloatFlowVolume, FloatFlowVolumeMatrix, FloatFlowVolumeVector, FloatForce, FloatForceMatrix, FloatForceVector, FloatFrequency, FloatFrequencyMatrix, FloatFrequencyVector, FloatIlluminance, FloatIlluminanceMatrix, FloatIlluminanceVector, FloatLength, FloatLengthMatrix, FloatLengthVector, FloatLinearDensity, FloatLinearDensityMatrix, FloatLinearDensityVector, FloatLuminousFlux, FloatLuminousFluxMatrix, FloatLuminousFluxVector, FloatLuminousIntensity, FloatLuminousIntensityMatrix, FloatLuminousIntensityVector, FloatMagneticFlux, FloatMagneticFluxDensity, FloatMagneticFluxDensityMatrix, FloatMagneticFluxDensityVector, FloatMagneticFluxMatrix, FloatMagneticFluxVector, FloatMass, FloatMassMatrix, FloatMassVector, FloatPosition, FloatPositionMatrix, FloatPositionVector, FloatPower, FloatPowerMatrix, FloatPowerVector, FloatPressure, FloatPressureMatrix, FloatPressureVector, FloatRadioActivity, FloatRadioActivityMatrix, FloatRadioActivityVector, FloatSIMatrix, FloatSIScalar, FloatSIVector, FloatSolidAngle, FloatSolidAngleMatrix, FloatSolidAngleVector, FloatSpeed, FloatSpeedMatrix, FloatSpeedVector, FloatTemperature, FloatTemperatureMatrix, FloatTemperatureVector, FloatTime, FloatTimeMatrix, FloatTimeVector, FloatTorque, FloatTorqueMatrix, FloatTorqueVector, FloatVolume, FloatVolumeMatrix, FloatVolumeVector, FlowMass, FlowMassMatrix, FlowMassVector, FlowVolume, FlowVolumeMatrix, FlowVolumeVector, Force, ForceMatrix, ForceVector, Frequency, FrequencyMatrix, FrequencyVector, Illuminance, IlluminanceMatrix, IlluminanceVector, Length, LengthMatrix, LengthVector, LinearDensity, LinearDensityMatrix, LinearDensityVector, LuminousFlux, LuminousFluxMatrix, LuminousFluxVector, LuminousIntensity, LuminousIntensityMatrix, LuminousIntensityVector, MagneticFlux, MagneticFluxDensity, MagneticFluxDensityMatrix, MagneticFluxDensityVector, MagneticFluxMatrix, MagneticFluxVector, Mass, MassMatrix, MassVector, Position, PositionMatrix, PositionVector, Power, PowerMatrix, PowerVector, Pressure, PressureMatrix, PressureVector, RadioActivity, RadioActivityMatrix, RadioActivityVector, SIMatrix, SIScalar, SIVector, SolidAngle, SolidAngleMatrix, SolidAngleVector, Speed, SpeedMatrix, SpeedVector, Temperature, TemperatureMatrix, TemperatureVector, Time, TimeMatrix, TimeVector, Torque, TorqueMatrix, TorqueVector, Volume, VolumeMatrix, VolumeVector

public interface ValueFunctions<U extends Unit<U>,​T extends Value<U,​T>>
extends Serializable
Interface to force a limited number of functions of Math to be implemented for absolute values. Note: a lot of standard Math functions are not implemented, as they don't make sense with the units. E.g., a cubic root of a Volume should give a Length, and not another volume... Trigoniometric functions should not give back the same unit either. The abs() function is not included here, as abs() only makes sense for relative vales. What is the absolute value of 14 January 2016? Therefore the set of functions that the interface forces to implement is rather limited, and certainly not the entire range of java.lang.Math functions.

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

Author:
Alexander Verbraeck, Peter Knoppers
  • Method Summary

    Modifier and Type Method Description
    T abs()
    Return a new Scalar/Vector/Matrix with absolute value(s).
    T ceil()
    Return a new Scalar/Vector/Matrix with the nearest integer value(s) above the current value(s).
    T floor()
    Return a new Scalar/Vector/Matrix with the nearest integer value(s) below the current value(s).
    T neg()
    Return a new Scalar/Vector/Matrix with negated value(s).
    T rint()
    Return a new Scalar/Vector/Matrix with the nearest integer value(s).
  • Method Details

    • abs

      T abs()
      Return a new Scalar/Vector/Matrix with absolute value(s).
      Returns:
      R; a new R with absolute value(s)
    • ceil

      T ceil()
      Return a new Scalar/Vector/Matrix with the nearest integer value(s) above the current value(s).
      Returns:
      R; a new R with absolute value(s)
    • floor

      T floor()
      Return a new Scalar/Vector/Matrix with the nearest integer value(s) below the current value(s).
      Returns:
      R; a new R with absolute value(s)
    • neg

      T neg()
      Return a new Scalar/Vector/Matrix with negated value(s).
      Returns:
      R; a new R with negated value(s)
    • rint

      T rint()
      Return a new Scalar/Vector/Matrix with the nearest integer value(s). When the value is exactly in the middle between two integer values, the even one is returned.
      Returns:
      R; a new R with absolute value(s)