Class Smoothing

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String MSA
      short hand for configuring smoothing with MSA instance
      • Fields inherited from class org.djutils.event.EventProducer

        listeners
      • Fields inherited from interface org.djutils.event.EventProducerInterface

        FIRST_POSITION, LAST_POSITION
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract double[] applySmoothing​(double[] previousValues, double[] proposedValues, int numberOfValues)
      Apply smoothing based on the current step size
      abstract double applySmoothing​(double previousValue, double proposedValue)
      Apply smoothing based on the current step size
      abstract void update​(int iterationIndex)
      Determine the stepsize for the passed in iteraction
      • Methods inherited from class org.djutils.event.EventProducer

        addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, getEventTypesWithListeners, hasListeners, numberOfListeners, removeAllListeners, removeAllListeners, removeListener
    • Field Detail

      • MSA

        public static final String MSA
        short hand for configuring smoothing with MSA instance
    • Constructor Detail

      • Smoothing

        public Smoothing​(IdGroupingToken groupId)
        Base constructor
        Parameters:
        groupId - contiguous id generation within this group for instances of this class
    • Method Detail

      • update

        public abstract void update​(int iterationIndex)
        Determine the stepsize for the passed in iteraction
        Parameters:
        iterationIndex - index of current iteration
      • applySmoothing

        public abstract double applySmoothing​(double previousValue,
                                              double proposedValue)
        Apply smoothing based on the current step size
        Parameters:
        previousValue - previous value
        proposedValue - proposed value
        Returns:
        smoothedValue smoothed value
      • applySmoothing

        public abstract double[] applySmoothing​(double[] previousValues,
                                                double[] proposedValues,
                                                int numberOfValues)
        Apply smoothing based on the current step size
        Parameters:
        previousValues - array of previous values
        proposedValues - array of proposed values
        numberOfValues - number of proposed values
        Returns:
        smoothedValues array of smoothed values