|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.able.beans.AbleDataAnalytics
This class provides statistical and time series analysis of data contained in AbleDataTable column's AbleDataSeries. The methods in Statistics are briefly described below (comparators for strComparator are the strings "NE" (!=), "GT" (>), "GE" (>=), "EQ" (==), "LE" (<=), "LT" (<)
AbleDataSeries
,
AbleDataTable
, Serialized FormField Summary | |
---|---|
static int |
EQ
Equal to 2, this defines the value to signify EQ (Equal) |
static int |
GE
Equal to 3, this defines the value to signify GE (Greater than or Equal) |
static int |
GT
Equal to 4, this defines the value to signify GT (Greater Than) |
static int |
INTERCEPT_INDEX
Equal to 1, this defines the index of the intercept in the array returned by linear regression calculations. |
static int |
INVALID
Equal to -1, this defines the value to signify an invalid comparator. |
static int |
INVALID_INDEX
Equal to -1, this is used to signal an invalid index for operations expecting to return an index to information (typically uesd when none is available or when an error has occurred). |
static int |
LE
Equal to 1, this defines the value to signify LE (Less than or Equal) |
static int |
LT
Equal to 0, this defines the value to signify LT (Less than) |
static int |
NE
Equal to 5, this defines the value to signify NE (Not Equal) |
static int |
SLOPE_INDEX
Equal to 0, this defines the index of the slope in the array returned by linear regression calculations. |
static java.lang.String[] |
strComparisonNames
A String[] containing the abbreviated names for the comparators. |
static java.lang.String[] |
strComparisonSymbols
A String[] containing the symbolic names for the comparators. |
Constructor Summary | |
---|---|
AbleDataAnalytics()
Constructor for this class. |
Method Summary | |
---|---|
static java.lang.String |
arrayContentsAsString(double[] dArray)
Static utility method to return the content of an double array (double[]) as a String of comma separated values. |
static java.lang.String |
arrayContentsAsString(double[] dArray,
double iBreakCount)
Static utility method to return the content of an double array (double[]) as a String of comma separated values, with line terminators every N values listed. |
static java.lang.String |
arrayContentsAsString(int[] iArray)
Static utility method to return the content of an int array (int[]) as a String of comma separated values. |
static java.lang.String |
arrayContentsAsString(int[] iArray,
int iBreakCount)
Static utility method to return the content of an int array (int[]) as a String of comma separated values, with line terminators every N values listed. |
static java.lang.Boolean |
booleanAnd(java.lang.Boolean b1,
java.lang.Boolean b2)
Helper method to all the logical "AND" of two Boolean values. |
static java.lang.String |
Copyright()
Determine the copyright of this class. |
static java.lang.Double |
countNonContiguousTHold(double[] dArray,
java.lang.Double DTHold,
java.lang.Double DComparator)
Method that counts the values in the passed double array (double[]) that meet the comparison defined by strComparator to the passed threshold (e.g., # values GE 2.0) |
static int |
countNonContiguousTHold(double[] dArray,
double dTHold,
int iComparator)
Method that counts the values in the passed double array (double[]) that meet the comparison defined by strComparator to the passed threshold (e.g., # values GE 2.0) |
static java.lang.Double |
countNonContiguousTHold(double[] dArray,
java.lang.Double DTHold,
java.lang.String strComparator)
Method that counts the values in the passed double array (double[]) that meet the comparison defined by strComparator to the passed threshold (e.g., # values GE 2.0) |
static int[] |
findContiguousInWindow(int[] inputIndices,
double[] dTime,
double dWindowSize)
Method using a sliding window against the dTime array, find the sets of indices in inputIndices that are contiguous and return only these contiguous indices in an int[]. |
static int[] |
findContiguousInWindow(int[] inputIndices,
double[] dTime,
java.lang.Double DWindowSize)
Method using a sliding window against the dTime array, find the sets of indices in inputIndices that are contiguous and return only these contiguous indices in an int[]. |
static java.lang.Double |
getArrayCount(double[] dArray)
Helper method to return the length of a double array (double[]) |
static java.lang.Double |
getArrayCount(int[] iArray)
Helper method to return the length of an int array (int[]) |
static int |
getComparisonByName(java.lang.String strComparator)
Method to return the numeric value corresponding with the String passed in. |
static int |
getNegativeComparator(int iComparator)
Method to calculate the negative of a comparator |
static int |
getOppositeComparator(int iComparator)
Method to calculate the opposite of a comparator |
static double[] |
linearRegression(double[] dXValues,
double[] dYValues)
Method to calculate a linear regression for the passed X and Y values. |
static double[] |
linearRegression(double[] dXValues,
double[] dYValues,
java.lang.Double DXBar,
java.lang.Double DYBar)
Method to calculate a linear regression for the passed X and Y values. |
static double[] |
linearRegression(double[] dXValues,
double[] dYValues,
double dXBar,
double dYBar,
int iStartIndex,
int iEndIndex)
Method to calculate a linear regression for the passed X and Y values within the range >= iStartIndex and |
static java.util.Vector |
linearRegressionToList(double[] dXValues,
double[] dYValues)
Method to calculate a linear regression for the passed X and Y values. |
static java.util.Vector |
linearRegressionToList(java.util.Vector vectXValues,
java.util.Vector vectYValues)
Method to calculate a linear regression for the passed X and Y values. |
static double |
mean(double[] dArray)
Method to calculate the mean for the passed array. |
static java.lang.Boolean |
meanBoundedWindow(double[] dArray,
double[] dTime,
java.lang.Double DWindowSize,
java.lang.Double DTHoldUpper,
java.lang.Double DComparatorUpper,
java.lang.Double DTHoldLower,
java.lang.Double DComparatorLower)
Method to determine if there is at least one window of the sized passed in time, where all the average of the values of passed value array compare favorably against the thresholds using their respective comparators. |
static java.lang.Boolean |
meanBoundedWindow(double[] dArray,
double[] dTime,
java.lang.Double DWindowSize,
java.lang.Double DTHoldUpper,
java.lang.String strComparatorUpper,
java.lang.Double DTHoldLower,
java.lang.String strComparatorLower)
Method to determine if there is at least one window of the sized passed in time, where all the average of the values of passed value array compare favorably against the thresholds using their respective comparators. |
static java.lang.Boolean |
meanTHoldWindow(double[] dArray,
double[] dTime,
java.lang.Double DWindowSize,
java.lang.Double DTHold,
java.lang.Double DComparator)
Method to determine if there is a window of the sized passed in time, where the average of all the values of passed value array compare favorably against a threshold using a comparator. |
static java.lang.Boolean |
meanTHoldWindow(double[] dArray,
double[] dTime,
java.lang.Double DWindowSize,
java.lang.Double DTHold,
java.lang.String strComparator)
Method to determine if there is a window of the sized passed in time, where the average of all the values of passed value array compare favorably against a threshold using a comparator. |
static int[] |
meanTHoldWindowIndices(double[] dArray,
double[] dTime,
java.lang.Double DWindowSize,
java.lang.Double DTHold,
java.lang.Double DComparator)
Method to evaluate a sliding window of predefined size against an array of time values and for the corresponding elements of the value array, see if their mean value compares favorably against the threshold value using the comparator, and return an array of the indices to the rows where this occurs. |
static int[] |
meanTHoldWindowIndices(double[] dArray,
double[] dTime,
double dWindowSize,
double dTHold,
int iComparator)
Method to evaluate a sliding window of predefined size against an array of time values and for the corresponding elements of the value array, see if their mean value compares favorably against the threshold value using the comparator, and return an array of the indices to the rows where this occurs. |
static int[] |
meanTHoldWindowIndices(double[] dArray,
double[] dTime,
java.lang.Double DWindowSize,
java.lang.Double DTHold,
java.lang.String strComparator)
Method to evaluate a sliding window of predefined size against an array of time values and for the corresponding elements of the value array, see if their mean value compares favorably against the threshold value using the comparator, and return an array of the indices to the rows where this occurs. |
static java.lang.Double |
recordIndices(int[] iArray,
java.lang.Double DStart,
java.lang.Double DEnd,
java.lang.Double DLast)
Method that, given an existing array of sorted indices (iArray), and a range of other indices, and the last index we'd written to in the iArray, add the missing indices in the range [iStart,iEnd] to the iArray and return the new last index position in iArray we'd written to. |
static int |
recordIndices(int[] iArray,
int iStart,
int iEnd,
int iLast)
Method that, given an existing array of sorted indices (iArray), and a range of other indices, and the last index we'd written to in the iArray, add the missing indices in the range [iStart,iEnd] to the iArray and return the new last index position in iArray we'd written to. |
java.lang.Boolean |
setValue(java.lang.String strValue,
java.lang.Boolean BDefault)
Method to convert the passed String into a Boolean or, if this isn't possible, to return the passed default value. |
java.lang.Double |
setValue(java.lang.String strValue,
java.lang.Double DDefault)
Method to convert the passed String into a Double or, if this isn't possible, to return the passed default value. |
static int[] |
slopeTHoldWindowIndices(double[] dArray,
double[] dTime,
double dWindowSize,
double dTHold,
int iComparator,
boolean bUseAbsoluteValue)
Method to find, within the sliding window of predefined size as compared against the time array, the indices of the value array that yield a linear regression slope that compares favorably with the threshold using the comparator. |
static int[] |
slopeTHoldWindowIndices(double[] dArray,
double[] dTime,
java.lang.Double DWindowSize,
java.lang.Double DTHold,
java.lang.String strComparator,
java.lang.Boolean BUseAbsoluteValue)
Method to find, within the sliding window of predefined size as compared against the time array, the indices of the value array that yield a linear regression slope that compares favorably with the threshold using the comparator. |
static int[] |
sortedArrayIntersection(int[][] arrays)
Method that takes an array of int[] objects containing the indices of rows in a source of data (e.g., AbleDataTable) and assuming these indices are sorted in ascending order, finds the resulting int[] that contains the intersection of all of these indices. |
static int[] |
sortedArrayIntersection(java.util.Vector vectArrays)
Method that takes a vector of int[] objects containing the indices of rows in a source of data (e.g., AbleDataTable) and assuming these indices are sorted in ascending order, finds the resulting int[] that contains the intersection of all of these indices. |
static int[] |
sortedArrayUnion(int[][] arrays)
Method that takes an array of int[] objects containing the indices of rows in a source of data (e.g., AbleDataTable) and assuming these indices are sorted in ascending order, finds the resulting int[] that contains the union of all of these indices. |
static int[] |
sortedArrayUnion(java.util.Vector vectArrays)
Method that takes a vector of int[] objects containing the indices of rows in a source of data (e.g., AbleDataTable) and assuming these indices are sorted in ascending order, finds the resulting int[] that contains the union of all of these indices. |
static java.lang.Boolean |
testMonotonic(double[] dArray,
java.lang.Double DStartIndex,
java.lang.Double DEndIndex,
java.lang.Double DComparator)
Method that is the same as valueMonotonicWindowIndices, but it returns a Boolean examining the range of indices. |
static java.lang.Boolean |
testMonotonic(double[] dArray,
java.lang.Double DStartIndex,
java.lang.Double DEndIndex,
java.lang.Double DComparator,
java.lang.Boolean BAllowReset)
Method that is the same as valueMonotonicWindowIndices, but it returns a Boolean examining the range of indices. |
static java.lang.Boolean |
testMonotonic(double[] dArray,
java.lang.Double DStartIndex,
java.lang.Double DEndIndex,
java.lang.String strComparator)
Method that is the same as valueMonotonicWindowIndices, but it returns a Boolean examining the range of indices. |
static java.lang.Boolean |
testMonotonic(double[] dArray,
java.lang.Double DStartIndex,
java.lang.Double DEndIndex,
java.lang.String strComparator,
java.lang.Boolean BAllowReset)
Method that is the same as valueMonotonicWindowIndices, but it returns a Boolean examining the range of indices. |
static boolean |
testMonotonic(double[] dArray,
int iStartIndex,
int iEndIndex,
int iComparator,
boolean bAllowReset)
Method that is the same as valueMonotonicWindowIndices, but it returns a Boolean examining the range of indices. |
static java.lang.Boolean |
testMonotonic(int[] iArray,
java.lang.Double DStartIndex,
java.lang.Double DEndIndex,
java.lang.Double DComparator)
Method that is the same as valueMonotonicWindowIndices, but it returns a Boolean examining the range of indices. |
static java.lang.Boolean |
testMonotonic(int[] iArray,
java.lang.Double DStartIndex,
java.lang.Double DEndIndex,
java.lang.Double DComparator,
java.lang.Boolean BAllowReset)
Method that is the same as valueMonotonicWindowIndices, but it returns a Boolean examining the range of indices. |
static java.lang.Boolean |
testMonotonic(int[] iArray,
java.lang.Double DStartIndex,
java.lang.Double DEndIndex,
java.lang.String strComparator)
Method that is the same as valueMonotonicWindowIndices, but it returns a Boolean examining the range of indices. |
static java.lang.Boolean |
testMonotonic(int[] iArray,
java.lang.Double DStartIndex,
java.lang.Double DEndIndex,
java.lang.String strComparator,
java.lang.Boolean BAllowReset)
Method that is the same as valueMonotonicWindowIndices, but it returns a Boolean examining the range of indices. |
static boolean |
testMonotonic(int[] iArray,
int iStartIndex,
int iEndIndex,
int iComparator,
boolean bAllowReset)
Method that is the same as valueMonotonicWindowIndices, but it returns a Boolean examining the range of indices. |
static boolean |
testTHold(java.lang.Double DTHold,
java.lang.Double DValue,
java.lang.Double DComparator)
Method to return whether or not the value compares favorably with the threshold value. |
static boolean |
testTHold(double dTHold,
double dValue,
int iComparator)
Method to return whether or not the value compares favorably with the threshold value. |
static boolean |
testTHold(java.lang.Double DTHold,
java.lang.Double DValue,
java.lang.String strComparator)
Method to return whether or not the value compares favorably with the threshold value. |
static int[] |
transitionTHoldWindowIndices(double[] dArray,
double[] dTime,
java.lang.Double DWindowSize,
java.lang.Double DTHold)
|
static int[] |
valueMonotonicWindowIndices(double[] dArray,
double[] dTime,
java.lang.Double DWindowSize,
java.lang.Boolean BAllowReset,
java.lang.Double DComparator)
A method to find the indices of rows in the value array where the values within the sliding window as compared against the time array are conforming to the monotonic direction specified by direction, taking reset conditions into account iff the flag passed is true. |
static int[] |
valueMonotonicWindowIndices(double[] dArray,
double[] dTime,
double dWindowSize,
boolean bAllowReset,
int iComparator)
A method to find the indices of rows in the value array where the values within the sliding window as compared against the time array are conforming to the monotonic direction specified by direction, taking reset conditions into account iff the flag passed is true. |
static int[] |
valueMonotonicWindowIndices(double[] dArray,
double[] dTime,
java.lang.Double DWindowSize,
java.lang.Boolean BAllowReset,
java.lang.String strComparator)
A method to find the indices of rows in the value array where the values within the sliding window as compared against the time array are conforming to the monotonic direction specified by direction, taking reset conditions into account iff the flag passed is true. |
static int[] |
valueTHoldWindowIndices(double[] dArray,
double[] dTime,
double dWindowSize,
double dTHold,
int iComparator)
Method to find, within the sliding window of predefined size as compared against the time array, the indices of the value array that compare favorably with the threshold using the comparator. |
static int[] |
valueTHoldWindowIndices(double[] dArray,
double[] dTime,
java.lang.Double DWindowSize,
java.lang.Double DTHold,
java.lang.String strComparator)
Method to find, within the sliding window of predefined sized as compared against the time array, the indices of the value array that compare favorably with the threshold using the comparator. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int INVALID_INDEX
public static final int INTERCEPT_INDEX
public static final int SLOPE_INDEX
public static final int EQ
public static final int GE
public static final int GT
public static final int LE
public static final int LT
public static final int NE
public static final int INVALID
LT
,
LE
,
EQ
,
GE
,
GT
,
NE
public static final java.lang.String[] strComparisonSymbols
LT
,
LE
,
EQ
,
GE
,
GT
,
NE
public static final java.lang.String[] strComparisonNames
LT
,
LE
,
EQ
,
GE
,
GT
,
NE
Constructor Detail |
public AbleDataAnalytics()
Method Detail |
public static int getComparisonByName(java.lang.String strComparator)
strComparator
- A string containing one of the following:
"LT", "LE", "EQ", "GE", "GT", "NE"LT
,
LE
,
EQ
,
GE
,
GT
,
NE
public static java.lang.Boolean booleanAnd(java.lang.Boolean b1, java.lang.Boolean b2)
b1
- First Boolean value to be combined with the other (b2).b2
- Second Boolean value to be combined with the other (b1).public static java.lang.Double getArrayCount(int[] iArray)
iArray
- the array whose length is to be returned.public static java.lang.Double getArrayCount(double[] dArray)
dArray
- the array whose length is to be returned.public static java.lang.String arrayContentsAsString(int[] iArray)
iArray
- An int[] whose contents are to be listed in the
returned string.public static java.lang.String arrayContentsAsString(int[] iArray, int iBreakCount)
iArray
- An int[] whose contents are to be listed in the
returned string.iBreakCount
- inserts a newline after this number of entries
has been added to the output String.public static java.lang.String arrayContentsAsString(double[] dArray)
dArray
- An double[] whose contents are to be listed in the
returned string.public static java.lang.String arrayContentsAsString(double[] dArray, double iBreakCount)
dArray
- An double[] whose contents are to be listed in the
returned string.iBreakCount
- inserts a newline after this number of entries
has been added to the output String.public static java.lang.Double countNonContiguousTHold(double[] dArray, java.lang.Double DTHold, java.lang.String strComparator)
dArray
- A double[] whose contents are compared against
the supplied threshold using the supplied comparator.DTHold
- A Double containing the threshold value to be
compared with the contents of the supplied double[].strComparator
- A String containing the label for the
comparison to be performed.LT
,
LE
,
EQ
,
GE
,
GT
,
NE
public static java.lang.Double countNonContiguousTHold(double[] dArray, java.lang.Double DTHold, java.lang.Double DComparator)
dArray
- A double[] whose contents are compared against
the supplied threshold using the supplied comparator.DTHold
- A Double containing the threshold value to be
compared with the contents of the supplied double[].DComparator
- A Double containing the value for the
comparison to be performed.LT
,
LE
,
EQ
,
GE
,
GT
,
NE
public static int countNonContiguousTHold(double[] dArray, double dTHold, int iComparator)
dArray
- A double[] whose contents are compared against
the supplied threshold using the supplied comparator.dTHold
- A double containing the threshold value to be
compared with the contents of the supplied double[].iComparator
- An int containing the value for the
comparison to be performed.LT
,
LE
,
EQ
,
GE
,
GT
,
NE
public static int[] findContiguousInWindow(int[] inputIndices, double[] dTime, java.lang.Double DWindowSize)
inputIndices
- An int[] of record indices that have been
previously selected from what were once monotonically increasing
values (like record numbers where inputIndices[i] + 1 =
inputIndices[i+1]). This method reviews the values in this
array to find groups of values that do increase by one within
the specified sliding window of time.dTime
- A double[] of values representing some increase of
time. These values aren't interpreted to glean calendar dates
and times, but are expected to represent seconds with optional
fractions of time. These values are compared using the window
size.DWindowSize
- A Double measuring the amount of time (as
measured by the values in the dTime array) as a sliding window
used to review the values in dArray.public static int[] findContiguousInWindow(int[] inputIndices, double[] dTime, double dWindowSize)
inputIndices
- An int[] of record indices that have been
previously selected from what were once monotonically increasing
values (like record numbers where inputIndices[i] + 1 =
inputIndices[i+1]). This method reviews the values in this
array to find groups of values that do increase by one within
the specified sliding window of time.dTime
- A double[] of values representing some increase of
time. These values aren't interpreted to glean calendar dates
and times, but are expected to represent seconds with optional
fractions of time. These values are compared using the window
size.dWindowSize
- A double measuring the amount of time (as
measured by the values in the dTime array) as a sliding window
used to review the values in dArray.public static int[] valueMonotonicWindowIndices(double[] dArray, double[] dTime, java.lang.Double DWindowSize, java.lang.Boolean BAllowReset, java.lang.String strComparator)
dArray
- A double[] of values to be reviewed by this method.dTime
- A double[] of values representing some increase of
time. These values aren't interpreted to glean calendar dates
and times, but are expected to represent seconds with optional
fractions of time. These values are compared using the window
size.DWindowSize
- A Double measuring the amount of time (as
measured by the values in the dTime array) as a sliding window
used to review the values in dArray to see if these values
conform with the specified test, allowing for resets as specified
by the flag BAllowReset.BAllowReset
- A Boolean to determine if a reset condition
is to be permitted (true) or not (false) when evaluating the
direction of the values in dValue.strComparator
- A String describing the direction that this
method will look for in the dArray values. For example, "GE"
will test to see that during the sliding window, at least one
value is greater than the rest within the sliding window of time.LT
,
LE
,
EQ
,
GE
,
GT
,
NE
public static int[] valueMonotonicWindowIndices(double[] dArray, double[] dTime, java.lang.Double DWindowSize, java.lang.Boolean BAllowReset, java.lang.Double DComparator)
dArray
- A double[] of values to be reviewed by this method.dTime
- A double[] of values representing some increase of
time. These values aren't interpreted to glean calendar dates
and times, but are expected to represent seconds with optional
fractions of time. These values are compared using the window
size.DWindowSize
- A Double measuring the amount of time (as
measured by the values in the dTime array) as a sliding window
used to review the values in dArray to see if these values
conform with the specified test, allowing for resets as specified
by the flag BAllowReset.BAllowReset
- A Boolean to determine if a reset condition
is to be permitted (true) or not (false) when evaluating the
direction of the values in dValue.DComparator
- A Double describing the direction that this
method will look for in the dArray values. For example, GE
will test to see that during the sliding window, at least one
value is greater than the rest within the sliding window of time.LT
,
LE
,
EQ
,
GE
,
GT
,
NE
public static int[] valueMonotonicWindowIndices(double[] dArray, double[] dTime, double dWindowSize, boolean bAllowReset, int iComparator)
dArray
- A double[] of values to be reviewed by this method.dTime
- A double[] of values representing some increase of
time. These values aren't interpreted to glean calendar dates
and times, but are expected to represent seconds with optional
fractions of time. These values are compared using the window
size.dWindowSize
- A double measuring the amount of time (as
measured by the values in the dTime array) as a sliding window
used to review the values in dArray to see if these values
conform with the specified test, allowing for resets as specified
by the flag bAllowReset.bAllowReset
- A boolean to determine if a reset condition
is to be permitted (true) or not (false) when evaluating the
direction of the values in dValue.iComparator
- An int describing the direction that this
method will look for in the dArray values. For example, GE
will test to see that during the sliding window, at least one
value is greater than the rest within the sliding window of time.LT
,
LE
,
EQ
,
GE
,
GT
,
NE
public static int[] transitionTHoldWindowIndices(double[] dArray, double[] dTime, java.lang.Double DWindowSize, java.lang.Double DTHold)
public static java.lang.Boolean testMonotonic(int[] iArray, java.lang.Double DStartIndex, java.lang.Double DEndIndex, java.lang.String strComparator)
iArray
- An int[] containing the values to be evaluated.DStartIndex
- A Double containing the starting index within
the value array (iArray) to be evaluated.DEndIndex
- A Double containing the ending index within
the value array (iArray) to be evaluated.strComparator
- A String containing the comparator to be
used to evaluate the values in the value array.valueMonotonicWindowIndices(double[], double[], java.lang.Double, java.lang.Boolean, java.lang.String)
,
LT
,
LE
,
EQ
,
GE
,
GT
,
NE
public static java.lang.Boolean testMonotonic(int[] iArray, java.lang.Double DStartIndex, java.lang.Double DEndIndex, java.lang.Double DComparator)
iArray
- An int[] containing the values to be evaluated.DStartIndex
- A Double containing the starting index within
the value array (iArray) to be evaluated.DEndIndex
- A Double containing the ending index within
the value array (iArray) to be evaluated.DComparator
- A Double containing the comparator to be
used to evaluate the values in the value array.valueMonotonicWindowIndices(double[], double[], java.lang.Double, java.lang.Boolean, java.lang.String)
,
LT
,
LE
,
EQ
,
GE
,
GT
,
NE
public static java.lang.Boolean testMonotonic(int[] iArray, java.lang.Double DStartIndex, java.lang.Double DEndIndex, java.lang.String strComparator, java.lang.Boolean BAllowReset)
iArray
- An int[] containing the values to be evaluated.DStartIndex
- A Double containing the starting index within
the value array (iArray) to be evaluated.DEndIndex
- A Double containing the ending index within
the value array (iArray) to be evaluated.strComparator
- A String containing the comparator to be
used to evaluate the values in the value array.BAllowReset
- A Boolean to determine if a reset condition
is to be permitted (true) or not (false) when evaluating the
direction of the values in iArray.valueMonotonicWindowIndices(double[], double[], java.lang.Double, java.lang.Boolean, java.lang.String)
,
LT
,
LE
,
EQ
,
GE
,
GT
,
NE
public static java.lang.Boolean testMonotonic(int[] iArray, java.lang.Double DStartIndex, java.lang.Double DEndIndex, java.lang.Double DComparator, java.lang.Boolean BAllowReset)
iArray
- An int[] containing the values to be evaluated.DStartIndex
- A Double containing the starting index within
the value array (iArray) to be evaluated.DEndIndex
- A Double containing the ending index within
the value array (iArray) to be evaluated.DComparator
- A Double containing the comparator to be
used to evaluate the values in the value array.BAllowReset
- A Boolean to determine if a reset condition
is to be permitted (true) or not (false) when evaluating the
direction of the values in iArray.valueMonotonicWindowIndices(double[], double[], java.lang.Double, java.lang.Boolean, java.lang.String)
,
LT
,
LE
,
EQ
,
GE
,
GT
,
NE
public static boolean testMonotonic(int[] iArray, int iStartIndex, int iEndIndex, int iComparator, boolean bAllowReset)
iArray
- An int[] containing the values to be evaluated.iStartIndex
- An int containing the starting index within
the value array (iArray) to be evaluated.iEndIndex
- An int containing the ending index within
the value array (iArray) to be evaluated.iComparator
- An int containing the comparator to be
used to evaluate the values in the value array.bAllowReset
- A boolean to determine if a reset condition
is to be permitted (true) or not (false) when evaluating the
direction of the values in iArray.valueMonotonicWindowIndices(double[], double[], java.lang.Double, java.lang.Boolean, java.lang.String)
,
LT
,
LE
,
EQ
,
GE
,
GT
,
NE
public static java.lang.Boolean testMonotonic(double[] dArray, java.lang.Double DStartIndex, java.lang.Double DEndIndex, java.lang.String strComparator)
dArray
- A double[] containing the values to be evaluated.DStartIndex
- A Double containing the starting index within
the value array (iArray) to be evaluated.DEndIndex
- A Double containing the ending index within
the value array (iArray) to be evaluated.strComparator
- A String containing the comparator to be
used to evaluate the values in the value array.valueMonotonicWindowIndices(double[], double[], java.lang.Double, java.lang.Boolean, java.lang.String)
,
LT
,
LE
,
EQ
,
GE
,
GT
,
NE
public static java.lang.Boolean testMonotonic(double[] dArray, java.lang.Double DStartIndex, java.lang.Double DEndIndex, java.lang.Double DComparator)
dArray
- A double[] containing the values to be evaluated.DStartIndex
- A Double containing the starting index within
the value array (iArray) to be evaluated.DEndIndex
- A Double containing the ending index within
the value array (iArray) to be evaluated.DComparator
- A Double containing the comparator to be
used to evaluate the values in the value array.valueMonotonicWindowIndices(double[], double[], java.lang.Double, java.lang.Boolean, java.lang.String)
,
LT
,
LE
,
EQ
,
GE
,
GT
,
NE
public static java.lang.Boolean testMonotonic(double[] dArray, java.lang.Double DStartIndex, java.lang.Double DEndIndex, java.lang.String strComparator, java.lang.Boolean BAllowReset)
dArray
- A double[] containing the values to be evaluated.DStartIndex
- A Double containing the starting index within
the value array (iArray) to be evaluated.DEndIndex
- A Double containing the ending index within
the value array (iArray) to be evaluated.strComparator
- A String containing the comparator to be
used to evaluate the values in the value array.BAllowReset
- A Boolean to determine if a reset condition
is to be permitted (true) or not (false) when evaluating the
direction of the values in iArray.valueMonotonicWindowIndices(double[], double[], java.lang.Double, java.lang.Boolean, java.lang.String)
,
LT
,
LE
,
EQ
,
GE
,
GT
,
NE
public static java.lang.Boolean testMonotonic(double[] dArray, java.lang.Double DStartIndex, java.lang.Double DEndIndex, java.lang.Double DComparator, java.lang.Boolean BAllowReset)
dArray
- A double[] containing the values to be evaluated.DStartIndex
- A Double containing the starting index within
the value array (iArray) to be evaluated.DEndIndex
- A Double containing the ending index within
the value array (iArray) to be evaluated.DComparator
- A Double containing the comparator to be
used to evaluate the values in the value array.BAllowReset
- A Boolean to determine if a reset condition
is to be permitted (true) or not (false) when evaluating the
direction of the values in iArray.valueMonotonicWindowIndices(double[], double[], java.lang.Double, java.lang.Boolean, java.lang.String)
,
LT
,
LE
,
EQ
,
GE
,
GT
,
NE
public static boolean testMonotonic(double[] dArray, int iStartIndex, int iEndIndex, int iComparator, boolean bAllowReset)
dArray
- A double[] containing the values to be evaluated.iStartIndex
- An int containing the starting index within
the value array (iArray) to be evaluated.iEndIndex
- An int containing the ending index within
the value array (iArray) to be evaluated.iComparator
- An int containing the comparator to be
used to evaluate the values in the value array.bAllowReset
- A boolean to determine if a reset condition
is to be permitted (true) or not (false) when evaluating the
direction of the values in iArray.valueMonotonicWindowIndices(double[], double[], java.lang.Double, java.lang.Boolean, java.lang.String)
,
LT
,
LE
,
EQ
,
GE
,
GT
,
NE
public static int[] sortedArrayIntersection(java.util.Vector vectArrays)
vectArrays
- A Vector containing N int[]'s whose contents
are assumed to be sorted in ascending order.public static int[] sortedArrayIntersection(int[][] arrays)
arrays
- An array of int[]'s containing N int[]'s whose contents
are assumed to be sorted in ascending order.public static int[] sortedArrayUnion(java.util.Vector vectArrays)
vectArrays
- A Vector containing N int[]'s whose contents
are assumed to be sorted in ascending order.public static int[] sortedArrayUnion(int[][] arrays)
arrays
- An array of int[]'s containing N int[]'s whose contents
are assumed to be sorted in ascending order.public static java.lang.Double recordIndices(int[] iArray, java.lang.Double DStart, java.lang.Double DEnd, java.lang.Double DLast)
iArray
- An int[] containing the sorted values to be
appended with non-overlapping values in the range [Start,End].DStart
- A Double containing the start index of a range.DEnd
- A Double containing the end index of a range.DLast
- A Double containing the last index in iArray
that had recorded values.public static int recordIndices(int[] iArray, int iStart, int iEnd, int iLast)
iArray
- An int[] containing the sorted values to be
appended with non-overlapping values in the range [Start,End].iStart
- An int containing the start index of a range.iEnd
- An int containing the end index of a range.iLast
- An int containing the last index in iArray
that had recorded values.public static int[] meanTHoldWindowIndices(double[] dArray, double[] dTime, java.lang.Double DWindowSize, java.lang.Double DTHold, java.lang.String strComparator)
dArray
- A double[] of vlaues to be evaluated.dTime
- A double[] of values representing some increase of
time. These values aren't interpreted to glean calendar dates
and times, but are expected to represent seconds with optional
fractions of time. These values are compared using the window
size.DWindowSize
- A Double measuring the amount of time (as
measured by the values in the dTime array) as a sliding window
used to review the values in dArray.DTHold
- A Double containing a threshold value to be
compared against the values in the value array.strComparator
- A String containing the label for the
comparison to be performed.LT
,
LE
,
EQ
,
GE
,
GT
,
NE
public static int[] meanTHoldWindowIndices(double[] dArray, double[] dTime, java.lang.Double DWindowSize, java.lang.Double DTHold, java.lang.Double DComparator)
dArray
- A double[] of vlaues to be evaluated.dTime
- A double[] of values representing some increase of
time. These values aren't interpreted to glean calendar dates
and times, but are expected to represent seconds with optional
fractions of time. These values are compared using the window
size.DWindowSize
- A Double measuring the amount of time (as
measured by the values in the dTime array) as a sliding window
used to review the values in dArray.DTHold
- A Double containing a threshold value to be
compared against the values in the value array.DComparator
- A Double containing the label for the
comparison to be performed.LT
,
LE
,
EQ
,
GE
,
GT
,
NE
public static int[] meanTHoldWindowIndices(double[] dArray, double[] dTime, double dWindowSize, double dTHold, int iComparator)
dArray
- A double[] of vlaues to be evaluated.dTime
- A double[] of values representing some increase of
time. These values aren't interpreted to glean calendar dates
and times, but are expected to represent seconds with optional
fractions of time. These values are compared using the window
size.dWindowSize
- A double measuring the amount of time (as
measured by the values in the dTime array) as a sliding window
used to review the values in dArray.dTHold
- A double containing a threshold value to be
compared against the values in the value array.iComparator
- An int containing the label for the
comparison to be performed.LT
,
LE
,
EQ
,
GE
,
GT
,
NE
public static int[] valueTHoldWindowIndices(double[] dArray, double[] dTime, java.lang.Double DWindowSize, java.lang.Double DTHold, java.lang.String strComparator)
dArray
- A double[] of vlaues to be evaluated.dTime
- A double[] of values representing some increase of
time. These values aren't interpreted to glean calendar dates
and times, but are expected to represent seconds with optional
fractions of time. These values are compared using the window
size.DWindowSize
- A Double measuring the amount of time (as
measured by the values in the dTime array) as a sliding window
used to review the values in dArray.DTHold
- A Double containing a threshold value to be
compared against the values in the value array.strComparator
- A String containing the label for the
comparison to be performed.LT
,
LE
,
EQ
,
GE
,
GT
,
NE
public static boolean testTHold(java.lang.Double DTHold, java.lang.Double DValue, java.lang.String strComparator)
DValue
- A Double containing a value to be
compared against the passed threshold value.DTHold
- A Double containing a threshold value to be
compared against the passed value.strComparator
- A String containing the label for the
comparison to be performed.LT
,
LE
,
EQ
,
GE
,
GT
,
NE
public static boolean testTHold(java.lang.Double DTHold, java.lang.Double DValue, java.lang.Double DComparator)
DValue
- A Double containing a value to be
compared against the passed threshold value.DTHold
- A Double containing a threshold value to be
compared against the passed value.DComparator
- A Double containing the label for the
comparison to be performed.LT
,
LE
,
EQ
,
GE
,
GT
,
NE
public static boolean testTHold(double dTHold, double dValue, int iComparator)
dValue
- A double containing a value to be
compared against the passed threshold value.dTHold
- A double containing a threshold value to be
compared against the passed value.iComparator
- An int containing the label for the
comparison to be performed.LT
,
LE
,
EQ
,
GE
,
GT
,
NE
public static int[] valueTHoldWindowIndices(double[] dArray, double[] dTime, double dWindowSize, double dTHold, int iComparator)
dArray
- A double[] of vlaues to be evaluated.dTime
- A double[] of values representing some increase of
time. These values aren't interpreted to glean calendar dates
and times, but are expected to represent seconds with optional
fractions of time. These values are compared using the window
size.dWindowSize
- A double measuring the amount of time (as
measured by the values in the dTime array) as a sliding window
used to review the values in dArray.dTHold
- A double containing a threshold value to be
compared against the values in the value array.iComparator
- An int containing the label for the
comparison to be performed.LT
,
LE
,
EQ
,
GE
,
GT
,
NE
public static java.lang.Boolean meanTHoldWindow(double[] dArray, double[] dTime, java.lang.Double DWindowSize, java.lang.Double DTHold, java.lang.String strComparator)
dArray
- A double[] of vlaues to be evaluated.dTime
- A double[] of values representing some increase of
time. These values aren't interpreted to glean calendar dates
and times, but are expected to represent seconds with optional
fractions of time. These values are compared using the window
size.DWindowSize
- A Double measuring the amount of time (as
measured by the values in the dTime array) as a sliding window
used to review the values in dArray.DTHold
- A Double containing a threshold value to be
compared against the values in the value array.strComparator
- A String containing the label for the
comparison to be performed.LT
,
LE
,
EQ
,
GE
,
GT
,
NE
public static int[] slopeTHoldWindowIndices(double[] dArray, double[] dTime, java.lang.Double DWindowSize, java.lang.Double DTHold, java.lang.String strComparator, java.lang.Boolean BUseAbsoluteValue)
dArray
- A double[] of vlaues to be evaluated.dTime
- A double[] of values representing some increase of
time. These values aren't interpreted to glean calendar dates
and times, but are expected to represent seconds with optional
fractions of time. These values are compared using the window
size.DWindowSize
- A double measuring the amount of time (as
measured by the values in the dTime array) as a sliding window
used to review the values in inputIndices.DTHold
- A Double containing a threshold value to be
compared against the linear regression slope based on values in the
value array.strComparator
- A String containing the label for the
comparison to be performed.BUseAbsoluteValue
- A Boolean stating whether (true) or not (false)
the absolute value of the linear regression slope should be compared
against the threshold value passed. For example, if one only seeks to
determine where the changes in values are quickly changing without
regards to the direction of change (e.g., increasing or decreasing), then
one would set BUseAbsoluteValue to true. Conversely, if one only wants
to find the condition where values are increasing at a particular
minimum rate, they would use BUseAbsoluteValue as false and compare
using GE the threshold value.LT
,
LE
,
EQ
,
GE
,
GT
,
NE
public static int[] slopeTHoldWindowIndices(double[] dArray, double[] dTime, double dWindowSize, double dTHold, int iComparator, boolean bUseAbsoluteValue)
dArray
- A double[] of vlaues to be evaluated.dTime
- A double[] of values representing some increase of
time. These values aren't interpreted to glean calendar dates
and times, but are expected to represent seconds with optional
fractions of time. These values are compared using the window
size.dWindowSize
- A double measuring the amount of time (as
measured by the values in the dTime array) as a sliding window
used to review the values in inputIndices.dTHold
- A double containing a threshold value to be
compared against the linear regression slope based on values in the
value array.iComparator
- An int containing the label for the
comparison to be performed.BUseAbsoluteValue
- A Boolean stating whether (true) or not (false)
the absolute value of the linear regression slope should be compared
against the threshold value passed. For example, if one only seeks to
determine where the changes in values are quickly changing without
regards to the direction of change (e.g., increasing or decreasing), then
one would set BUseAbsoluteValue to true. Conversely, if one only wants
to find the condition where values are increasing at a particular
minimum rate, they would use BUseAbsoluteValue as false and compare
using GE the threshold value.LT
,
LE
,
EQ
,
GE
,
GT
,
NE
public static java.lang.Boolean meanTHoldWindow(double[] dArray, double[] dTime, java.lang.Double DWindowSize, java.lang.Double DTHold, java.lang.Double DComparator)
dArray
- A double[] of vlaues to be evaluated.dTime
- A double[] of values representing some increase of
time. These values aren't interpreted to glean calendar dates
and times, but are expected to represent seconds with optional
fractions of time. These values are compared using the window
size.DWindowSize
- A Double measuring the amount of time (as
measured by the values in the dTime array) as a sliding window
used to review the values in dArray.DTHold
- A Double containing a threshold value to be
compared against the values in the value array.DComparator
- A Double containing the label for the
comparison to be performed.LT
,
LE
,
EQ
,
GE
,
GT
,
NE
public static java.lang.Boolean meanBoundedWindow(double[] dArray, double[] dTime, java.lang.Double DWindowSize, java.lang.Double DTHoldUpper, java.lang.String strComparatorUpper, java.lang.Double DTHoldLower, java.lang.String strComparatorLower)
dArray
- A double[] of vlaues to be evaluated.dTime
- A double[] of values representing some increase of
time. These values aren't interpreted to glean calendar dates
and times, but are expected to represent seconds with optional
fractions of time. These values are compared using the window
size.DWindowSize
- A Double measuring the amount of time (as
measured by the values in the dTime array) as a sliding window
used to review the values in dArray.DTHoldUpper
- A Double containing an upper threshold value to be
compared against the values in the value array.strComparatorUpper
- A String containing the
comparison label to be performed against the DTHoldUpper threshold.DTHoldLower
- A Double containing a lower threshold value to be
compared against the values in the value array.strComparatorLower
- A String containing the
comparison label to be performed against the DTHoldLower threshold.LT
,
LE
,
EQ
,
GE
,
GT
,
NE
public static java.lang.Boolean meanBoundedWindow(double[] dArray, double[] dTime, java.lang.Double DWindowSize, java.lang.Double DTHoldUpper, java.lang.Double DComparatorUpper, java.lang.Double DTHoldLower, java.lang.Double DComparatorLower)
dArray
- A double[] of vlaues to be evaluated.dTime
- A double[] of values representing some increase of
time. These values aren't interpreted to glean calendar dates
and times, but are expected to represent seconds with optional
fractions of time. These values are compared using the window
size.DWindowSize
- A Double measuring the amount of time (as
measured by the values in the dTime array) as a sliding window
used to review the values in dArray.DTHoldUpper
- A Double containing an upper threshold value to be
compared against the values in the value array.DComparatorUpper
- A Double containing the
comparison to be performed against the DTHoldUpper threshold.DTHoldLower
- A Double containing a lower threshold value to be
compared against the values in the value array.DComparatorLower
- A Double containing the
comparison to be performed against the DTHoldLower threshold.LT
,
LE
,
EQ
,
GE
,
GT
,
NE
public static int getOppositeComparator(int iComparator)
iComparator
- An int containing comparator for whom the
opposite would be found.public static int getNegativeComparator(int iComparator)
iComparator
- An int containing comparator for whom the
negative would be found.public static double mean(double[] dArray)
dArray
- A double[] containing values for which the
mean will be calculated.public static java.util.Vector linearRegressionToList(java.util.Vector vectXValues, java.util.Vector vectYValues)
vectXValues
- A Vector containing X values for which the
linear regression will be calculated.vectYValues
- A Vector containing Y values for which the
linear regression will be calculated.INTERCEPT_INDEX
,
SLOPE_INDEX
public static java.util.Vector linearRegressionToList(double[] dXValues, double[] dYValues)
dXValues
- A double[] containing X values for which the
linear regression will be calculated.dYValues
- A double[] containing Y values for which the
linear regression will be calculated.INTERCEPT_INDEX
,
SLOPE_INDEX
public static double[] linearRegression(double[] dXValues, double[] dYValues)
dXValues
- A double[] containing X values for which the
linear regression will be calculated.dYValues
- A double[] containing Y values for which the
linear regression will be calculated.INTERCEPT_INDEX
,
SLOPE_INDEX
public static double[] linearRegression(double[] dXValues, double[] dYValues, java.lang.Double DXBar, java.lang.Double DYBar)
dXValues
- A double[] containing X values for which the
linear regression will be calculated.dYValues
- A double[] containing Y values for which the
linear regression will be calculated.DXBar
- A Double with the mean of the X values.DYBar
- A Double with the mean of the Y values.INTERCEPT_INDEX
,
SLOPE_INDEX
public static double[] linearRegression(double[] dXValues, double[] dYValues, double dXBar, double dYBar, int iStartIndex, int iEndIndex)
dXValues
- A double[] containing X values for which the
linear regression will be calculated.dYValues
- A double[] containing Y values for which the
linear regression will be calculated.dXBar
- A double with the mean of the X values.dYBar
- A double with the mean of the Y values.iStartIndex
- An int with theINTERCEPT_INDEX
,
SLOPE_INDEX
public java.lang.Double setValue(java.lang.String strValue, java.lang.Double DDefault)
strValue
- A String containing the value to be converted
into a Double.DDefault
- A Double containing the default value to be
returned if the passed String doesn't convert to a Double.public java.lang.Boolean setValue(java.lang.String strValue, java.lang.Boolean BDefault)
strValue
- A String containing the value to be converted
into a Boolean.DDefault
- A Boolean containing the default value to be
returned if the passed String doesn't convert to a Boolean.public static java.lang.String Copyright()
|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |