visad.data.in
Class LonArithProg
- java.lang.Object
-
- visad.data.in.ArithProg
-
- visad.data.in.LonArithProg
-
public final class LonArithProg extends ArithProg
Provides support for determining if a sequence of values is an arithmetic progression of longitude values and, if so, the progression parameters.
-
-
Constructor Summary
Constructors Constructor and Description LonArithProg()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanaccumulate(double[] values)Accumulates a set of doubles.booleanaccumulate(float[] values)Accumulates a set of floats.static voidmain(java.lang.String[] args)Tests this class.-
Methods inherited from class visad.data.in.ArithProg
accumulate, accumulate, getCommonDifference, getFirst, getLast, getNumber, isConsistent
-
-
-
-
Method Detail
-
accumulate
public boolean accumulate(float[] values) throws VisADExceptionAccumulates a set of floats. Indicates whether or not the sequence is consistent with the arithmetic progression so far.- Overrides:
accumulatein classArithProg- Parameters:
values- The values to accumulate.- Returns:
- False if the difference between any current and previous value normalized by the current increment differs from unity by more than the nearness threshold; otherwise, true.
- Throws:
VisADException-ArithProg.isConsistent()was false before this method was invoked.
-
accumulate
public boolean accumulate(double[] values) throws VisADExceptionAccumulates a set of doubles. Indicates whether or not the sequence is consistent with the arithmetic progression so far.- Overrides:
accumulatein classArithProg- Parameters:
values- The values to accumulate.- Returns:
- False if the difference between any current and previous value normalized by the current increment differs from unity by more than the nearness threshold; otherwise, true.
- Throws:
VisADException-ArithProg.isConsistent()was false before this method was invoked.
-
main
public static void main(java.lang.String[] args) throws java.lang.ExceptionTests this class.- Parameters:
args- Runtime arguments. Ignored.- Throws:
java.lang.Exception- Something went wrong.
-
-
DMelt 3.0 © DataMelt by jWork.ORG