public class ArithProg extends Object
Modifier and Type | Field and Description |
---|---|
protected double |
dEps |
protected double |
fEps |
protected double |
first |
protected boolean |
isConsistent |
protected double |
last |
protected double |
meanDel |
protected long |
n |
Constructor and Description |
---|
ArithProg() |
Modifier and Type | Method and Description |
---|---|
boolean |
accumulate(double value)
Accumulates a value.
|
boolean |
accumulate(double[] values)
Accumulates a set of doubles.
|
boolean |
accumulate(float value)
Accumulates a value.
|
boolean |
accumulate(float[] values)
Accumulates a set of floats.
|
double |
getCommonDifference()
Gets the current common difference.
|
double |
getFirst()
Gets the first value.
|
double |
getLast()
Returns the "last" value accumulated.
|
long |
getNumber()
Gets the number of values.
|
boolean |
isConsistent()
Indicates whether or not the sequence so far is consistent with an
arithmetic progression.
|
static void |
main(String[] args) |
protected long n
protected double first
protected double last
protected double meanDel
protected boolean isConsistent
protected final double fEps
protected final double dEps
public boolean accumulate(float[] values) throws VisADException
values
- The values to accumulate.VisADException
- isConsistent()
was false before this
method was invoked.public boolean accumulate(double[] values) throws VisADException
values
- The values to accumulate.VisADException
- isConsistent()
was false before this
method was invoked.public final boolean accumulate(float value) throws VisADException
value
- The value to accumulate.VisADException
- The sequence isn't an arithmetic progression.public final boolean accumulate(double value) throws VisADException
value
- The value to accumulate.VisADException
- The sequence isn't an arithmetic progression.public final boolean isConsistent()
true
if and only if the sequence
of values seen so far is consistent with an
arithmetic progression.public final long getNumber() throws VisADException
isConsistent()
is true.VisADException
- The sequence isn't an arithmetic progression.public final double getFirst() throws VisADException
VisADException
- The sequence isn't an arithmetic progression.public final double getLast() throws VisADException
isConsistent
is true.VisADException
- The sequence isn't an arithmetic progression.public final double getCommonDifference() throws VisADException
isConsistent()
is true.VisADException
- The sequence isn't an arithmetic progression.Copyright © 1996–2023 The SSEC Visualization Project. All rights reserved.