org.encog.util.arrayutil
Class VectorWindow
- java.lang.Object
-
- org.encog.util.arrayutil.VectorWindow
-
public class VectorWindow extends java.lang.ObjectCreate 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
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidadd(double[] vec)Add a single vector to the window.voidcopyWindow(double[] output, int startPos)Copy the entire window to a complete vector.booleanisReady()
-
-
-
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.
-
-
DMelt 3.0 © DataMelt by jWork.ORG