org.encog.util.arrayutil

## Class VectorWindow

- java.lang.Object
- - org.encog.util.arrayutil.VectorWindow

-     public class VectorWindow
      extends Object

  Create a sliding window of double arrays. New vectors can be added to the window. Once the required number of vectors have been added then the entire window can be copied to an output vector large enough to hold it.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `VectorWindow(int theSliceCount)` Construct a sliding window.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(double[] vec)` Add a single vector to the window.
    `void` | `copyWindow(double[] output, int startPos)` Copy the entire window to a complete vector.
    `boolean` | `isReady()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### VectorWindow

          public VectorWindow(int theSliceCount)

      Construct a sliding window.
      Parameters:
        `theSliceCount` - The number of slices in a window.

  - ### Method Detail

    - #### add

          public void add(double[] vec)

      Add a single vector to the window.
      Parameters:
        `vec` - The vector to add to the window.

    - #### isReady

          public boolean isReady()

      Returns:
        True, if we've added enough slices for a complete window.

    - #### copyWindow

          public void copyWindow(double[] output,
                        int startPos)

      Copy the entire window to a complete vector.
      Parameters:
        `output` - The vector to copy to.
        `startPos` - The starting position to write to.

Copyright © 2014. All Rights Reserved.