Class AbstractVariationParameter

    • Field Detail

      • DEFAULT_DELTA

        public static final double DEFAULT_DELTA
        the value which is used as default variation for a parameter
        See Also:
        Constant Field Values
      • lastOffset

        public double lastOffset
    • Constructor Detail

      • AbstractVariationParameter

        public AbstractVariationParameter​(java.lang.String key,
                                          double initialOffset)
    • Method Detail

      • init

        protected final void init()
      • apply

        protected abstract void apply()
        to be overridden by subclass: must transport the actual value to the desired targets
      • getKey

        public final java.lang.String getKey()
        Description copied from interface: VariationParameter
        returns the key, for storage in an HashMap
        Specified by:
        getKey in interface VariationParameter
        Returns:
        the key for this parameter
      • getName

        public final java.lang.String getName()
        Specified by:
        getName in interface VariationParameter
        Returns:
        the name
      • getInitialOffset

        public final double getInitialOffset()
        Specified by:
        getInitialOffset in interface VariationParameter
        Returns:
        the initial value for this parameter
      • setInitialOffset

        public final void setInitialOffset​(double initialValue)
        Description copied from interface: VariationParameter
        sets the initial value
        Specified by:
        setInitialOffset in interface VariationParameter
        Parameters:
        initialValue - the value to set
      • getDelta

        public final double getDelta()
        Description copied from interface: VariationParameter
        get the delta, which is used by a Calculator to vary the parameter in order to calculate the differential quotient.
        Specified by:
        getDelta in interface VariationParameter
        Returns:
        the delta
      • getSensitivity

        public final double getSensitivity()
        Specified by:
        getSensitivity in interface VariationParameter
        Returns:
        the sensitivity of the parameter
      • setSensitivity

        public final void setSensitivity​(double sensitivity)
        Description copied from interface: VariationParameter
        The sensitivity of the parameter during the last fit-iteration.
        Specified by:
        setSensitivity in interface VariationParameter
        Parameters:
        sensitivity - the sensitivity to set
      • undo

        public final void undo()
        Description copied from interface: VariationParameter
        reverts the actual value to the last one. this only works once!
        Specified by:
        undo in interface VariationParameter
      • setActualOffset

        public final void setActualOffset​(double actualOffset)
        Description copied from interface: VariationParameter
        set the actual offset to the initial value
        Specified by:
        setActualOffset in interface VariationParameter
        Parameters:
        actualOffset - the value to set
      • setUpdateFactor

        public final void setUpdateFactor​(double factor)
        Description copied from interface: VariationParameter
        sets the factor which is applied when updating the data for this parameter. A lower factor means slower convergence. a factor 1 means applying the whole calculated value.
        Specified by:
        setUpdateFactor in interface VariationParameter
      • addValueScaled

        public final void addValueScaled​(double value)
        adds the given value to the parameter. (may be scaled internally)
        Specified by:
        addValueScaled in interface VariationParameter
        Parameters:
        value - value that shall be added
      • addDelta

        public void addDelta()
        Description copied from interface: VariationParameter
        adds the delta-value to the parameter. This is used, when calculating the gradient. It has to be used together with undo().
        Specified by:
        addDelta in interface VariationParameter
      • getError

        public double getError()
        Specified by:
        getError in interface VariationParameter
        Returns:
        the error resulting from the last fit iteration
      • setError

        public void setError​(double error)
        Description copied from interface: VariationParameter
        set the error for the parameter from the last calculation
        Specified by:
        setError in interface VariationParameter
        Parameters:
        error - the error from the last calculation