Fixed spelling of INFINITE_WINDOW.

PR: 20234
Submitted by: Al Chou


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140860 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Tim O'Brien 2003-05-26 17:40:20 +00:00
parent 43c787eb35
commit 03e996b075
4 changed files with 12 additions and 12 deletions

View File

@ -63,7 +63,7 @@ public class ListUnivariateImpl extends AbstractStoreUnivariate {
// Holds the value of the windowSize, initial windowSize is the constant
// Univariate.INFINITE_WINDOW
private int windowSize = Univariate.INIFINTE_WINDOW;
private int windowSize = Univariate.INFINITE_WINDOW;
// Holds a reference to a list - GENERICs are going to make
// out lives easier here as we could only accept List<Number>
@ -81,11 +81,11 @@ public class ListUnivariateImpl extends AbstractStoreUnivariate {
// If we've got a windowSize, we might not care about the entire list.
List effectiveList = list;
// If the window size is not INIFINITE_WINDOW AND
// If the window size is not INFINITE_WINDOW AND
// the current list is larger that the window size, we need to
// take into account only the last n elements of the list
// as definied by windowSize
if (windowSize != Univariate.INIFINTE_WINDOW &&
if (windowSize != Univariate.INFINITE_WINDOW &&
windowSize < list.size()) {
effectiveList = list.subList((list.size() - 1) - windowSize,
(list.size()-1));
@ -111,7 +111,7 @@ public class ListUnivariateImpl extends AbstractStoreUnivariate {
public double getElement(int index) {
double value = Double.NaN;
if (windowSize != Univariate.INIFINTE_WINDOW &&
if (windowSize != Univariate.INFINITE_WINDOW &&
windowSize < list.size()) {
int calcIndex = (list.size() - windowSize) + index;
@ -132,7 +132,7 @@ public class ListUnivariateImpl extends AbstractStoreUnivariate {
public int getN() {
int N = 0;
if (windowSize != Univariate.INIFINTE_WINDOW) {
if (windowSize != Univariate.INFINITE_WINDOW) {
if (list.size() > windowSize) {
N = windowSize;
} else {

View File

@ -62,7 +62,7 @@ public class StoreUnivariateImpl extends AbstractStoreUnivariate {
DoubleArray eDA;
// Store the windowSize
private int windowSize = Univariate.INIFINTE_WINDOW;
private int windowSize = Univariate.INFINITE_WINDOW;
public StoreUnivariateImpl() {
// A contractable double array is used. memory is reclaimed when
@ -99,7 +99,7 @@ public class StoreUnivariateImpl extends AbstractStoreUnivariate {
* @see org.apache.commons.math.Univariate#addValue(double)
*/
public synchronized void addValue(double v) {
if( windowSize != Univariate.INIFINTE_WINDOW ) {
if( windowSize != Univariate.INFINITE_WINDOW ) {
if( getN() == windowSize ) {
eDA.addElementRolling( v );
} else if( getN() < windowSize ) {

View File

@ -73,7 +73,7 @@
* @author Phil Steitz
* @author <a href="mailto:tobrien@apache.org">Tim O'Brien</a>
* @author Mark Diggory
* @version $Revision: 1.6 $ $Date: 2003/05/23 17:33:18 $
* @version $Revision: 1.7 $ $Date: 2003/05/26 17:40:20 $
*
*/
public interface Univariate {
@ -179,7 +179,7 @@ public interface Univariate {
* elements. In other words, if getWindow returns this
* constant, there is, in effect, no "window".
*/
static final int INIFINTE_WINDOW = -1;
static final int INFINITE_WINDOW = -1;
/**
* Univariate has the ability to return only measures for the

View File

@ -67,13 +67,13 @@ import java.io.Serializable;
* @author <a href="mailto:tobrien@apache.org">Tim O'Brien</a>
* @author Mark Diggory
* @author Brent Worden
* @version $Revision: 1.7 $ $Date: 2003/05/23 17:33:18 $
* @version $Revision: 1.8 $ $Date: 2003/05/26 17:40:20 $
*
*/
public class UnivariateImpl implements Univariate, Serializable {
/** hold the window size **/
private int windowSize = Univariate.INIFINTE_WINDOW;
private int windowSize = Univariate.INFINITE_WINDOW;
/** Just in case, the windowSize is not inifinite, we need to
* keep an array to remember values 0 to N
@ -175,7 +175,7 @@ public class UnivariateImpl implements Univariate, Serializable {
product = 1.0;
}
if( windowSize != Univariate.INIFINTE_WINDOW ) {
if( windowSize != Univariate.INFINITE_WINDOW ) {
if( windowSize == n ) {
double discarded = doubleArray.addElementRolling( v );