Class MSASmoothing

    • Field Detail

      • stepSize

        protected double stepSize
        Step size
      • DEFAULT_INITIAL_STEP_SIZE

        public static final double DEFAULT_INITIAL_STEP_SIZE
        The default initial step size to use
        See Also:
        Constant Field Values
    • Constructor Detail

      • MSASmoothing

        public MSASmoothing​(IdGroupingToken groupId)
        Constructor
        Parameters:
        groupId - contiguous id generation within this group for instances of this class
      • MSASmoothing

        public MSASmoothing​(MSASmoothing other)
        Copy constructor
        Parameters:
        other - to copy
    • Method Detail

      • updateStep

        public void updateStep​(int iterationIndex)
        Update stepSize to 1/iterationIndex
        Specified by:
        updateStep in class Smoothing
        Parameters:
        iterationIndex - index of current iteration
        See Also:
        Smoothing.updateStep(int)
      • execute

        public double execute​(double previousValue,
                              double proposedValue)
        Apply smoothing based on the current step size
        Specified by:
        execute in class Smoothing
        Parameters:
        previousValue - previous value
        proposedValue - proposed value
        Returns:
        smoothedValue smoothed value
      • execute

        public double[] execute​(double[] previousValues,
                                double[] proposedValues,
                                int numberOfValues)
        Apply smoothing based on the current step size
        Specified by:
        execute in class Smoothing
        Parameters:
        previousValues - array of previous values
        proposedValues - array of proposed values
        numberOfValues - number of proposed values
        Returns:
        smoothedValues array of smoothed values
      • clone

        public MSASmoothing clone()
        Create a shallow copy of this entity
        Specified by:
        clone in interface IdAble
        Specified by:
        clone in class Smoothing
        Returns:
        shallow copy of entity
      • reset

        public void reset()
        All components should be able to reset going back to some representative initial state
        Specified by:
        reset in class PlanitComponent<Smoothing>