Class AbstractDoubleVectorAbs<AU extends AbsoluteLinearUnit<AU,​RU>,​A extends AbstractDoubleScalarAbs<AU,​A,​RU,​R>,​AV extends AbstractDoubleVectorAbs<AU,​A,​AV,​RU,​R,​RV>,​RU extends Unit<RU>,​R extends AbstractDoubleScalarRelWithAbs<AU,​A,​RU,​R>,​RV extends AbstractDoubleVectorRelWithAbs<AU,​A,​AV,​RU,​R,​RV>>

    • Constructor Detail

      • AbstractDoubleVectorAbs

        protected AbstractDoubleVectorAbs​(DoubleVectorData data,
                                          AU unit)
        Construct a new Relative Mutable DoubleVector.
        Parameters:
        data - DoubleVectorData; an internal data object
        unit - AU; the unit
    • Method Detail

      • decrementBy

        public AV decrementBy​(R decrement)
        Decrement all values of this vector by the decrement. This only works if this vector is mutable.
        Parameters:
        decrement - R; the scalar by which to decrement all values
        Returns:
        AV; this modified vector
        Throws:
        ValueRuntimeException - in case this vector is immutable
      • decrementBy

        public AV decrementBy​(RV decrement)
        Decrement all values of this vector by the decrement on a value by value basis. This only works if this vector is mutable.
        Parameters:
        decrement - RV; the vector that contains the values by which to decrement the corresponding values
        Returns:
        AV; this modified vector
        Throws:
        ValueRuntimeException - in case this vector is immutable, when the sizes of the vectors differ, or decrement is null
      • instantiateVectorRel

        public abstract RV instantiateVectorRel​(DoubleVectorData dvd,
                                                RU displayUnit)
        Instantiate a new relative vector of the class of this absolute vector. This can be used instead of the DoubleVector.instiantiate() methods in case another vector of this absolute vector class is known. The method is faster than DoubleVector.instantiate, and it will also work if the vector is user-defined.
        Parameters:
        dvd - DoubleVectorData; the data used to instantiate the vector
        displayUnit - RU; the display unit of the relative vector
        Returns:
        RV; a relative vector of the correct type, belonging to this absolute vector type
      • instantiateScalarRelSI

        public abstract R instantiateScalarRelSI​(double valueSI,
                                                 RU displayUunit)
        Instantiate a new relative scalar for the class of this absolute vector. This can be used instead of the DoubleScalar.instiantiate() methods in case a vector of this class is known. The method is faster than DoubleScalar.instantiate, and it will also work if the vector and/or scalar are user-defined.
        Parameters:
        valueSI - double; the SI value of the relative scalar
        displayUunit - RU; the unit in which the relative value will be displayed
        Returns:
        R; a relative scalar of the correct type, belonging to this absolute vector type