Constructor and Description |
---|
BasicRanger(boolean isBestEfforts)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Ranger other)
Merges the contents of the supplied ranger into this one.
|
static double[] |
calculateFiniteBounds(double lo,
double hi,
boolean isPositive)
Returns a 2-element array giving definite lower and upper bounds
based on known lower and upper values.
|
Ranger |
createCompatibleRanger()
Returns a Ranger instance that is compatible with this one.
|
static Scaler |
createRangeScaler(Scaling.RangeScaling rscaling,
Subrange dataclip,
Span span)
Returns a scaler based on a RangeScaling.
|
Span |
createSpan()
Returns an object characterising the range of data submitted so far.
|
void |
submitDatum(double datum)
Accepts a data value.
|
public BasicRanger(boolean isBestEfforts)
isBestEfforts
- whether best efforts ranging should be done
without complaint for inappropriate scalingspublic void submitDatum(double datum)
Ranger
submitDatum
in interface Ranger
datum
- datumpublic void add(Ranger other)
Ranger
The supplied ranger is assumed to be compatible with this one, which probably means created in the same way. If not, some RuntimeException such as a ClassCastException may result.
public Ranger createCompatibleRanger()
Ranger
Ranger.add(uk.ac.starlink.ttools.plot2.Ranger)
method.createCompatibleRanger
in interface Ranger
public Span createSpan()
Ranger
Ranger.submitDatum(double)
.createSpan
in interface Ranger
public static double[] calculateFiniteBounds(double lo, double hi, boolean isPositive)
lo
- input lower bound, may be NaNhi
- input upper bound, may be NaNisPositive
- if true, output bounds must be positivepublic static Scaler createRangeScaler(Scaling.RangeScaling rscaling, Subrange dataclip, Span span)
rscaling
- scaling of range typedataclip
- input data range adjustmentspan
- data range informationCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.