Documentation of 'org.encog.util.arrayutil.WindowDouble' Java class
WindowDouble
org.encog.util.arrayutil

Class WindowDouble



  • public class WindowDouble
    extends java.lang.Object
    This class implements a simple sliding window. Arrays of doubles can be added to the window. The sliding window will fill up to the specified size. Additional entries will cause the oldest entries to fall off.
    • Constructor Summary

      Constructors 
      Constructor and Description
      WindowDouble(int theSize)
      Construct the window.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void add(double[] a)
      Add an array to the window.
      double calculateMax(int index, int starting)
      Calculate the max value, for the specified index, over all of the data in the window.
      double calculateMin(int index, int starting)
      Calculate the max value, for the specified index, over all of the data in the window.
      void clear()
      Clear the contents of the window.
      double[] getLast()
      Get the last value from the window.
      boolean isFull() 
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WindowDouble

        public WindowDouble(int theSize)
        Construct the window.
        Parameters:
        theSize - The size of the window.
    • Method Detail

      • add

        public void add(double[] a)
        Add an array to the window.
        Parameters:
        a - The array.
      • clear

        public void clear()
        Clear the contents of the window.
      • isFull

        public boolean isFull()
        Returns:
        True, if the window is full.
      • calculateMax

        public double calculateMax(int index,
                                   int starting)
        Calculate the max value, for the specified index, over all of the data in the window.
        Parameters:
        index - The index of the value to compare.
        starting - The starting position, inside the window to compare at.
        Returns:
        THe max value.
      • calculateMin

        public double calculateMin(int index,
                                   int starting)
        Calculate the max value, for the specified index, over all of the data in the window.
        Parameters:
        index - The index of the value to compare.
        starting - The starting position, inside the window to compare at.
        Returns:
        THe max value.
      • getLast

        public double[] getLast()
        Get the last value from the window. This is the most recent item added.
        Returns:
        The last value from the window.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.