# Interface Span

@Equality public interface Span
Characterises the extent and possibly the distribution of a dataset.

Since:
  14 Mar 2019
Author:
  Mark Taylor

## Method Summary

Modifier and Type
Method
Description
`Scaler`
`createScaler(Scaling scaling, Subrange dataclip)`
Returns a scaler that maps a value range based on this span to the range 0..1, according to a given scaling.
`double[]`
`getFiniteBounds(boolean requirePositive)`
Returns a 2-element array giving definite lower and upper bounds to be used for this span.
`double`
`getHigh()`
Returns the upper bound of this span.
`double`
`getLow()`
Returns the lower bound of this span.
`Span`
`limit(double lo, double hi)`
Creates a new span based on this one with optionally adjusted data bounds.

## Method Details

### getLow

double getLow()
Returns the lower bound of this span. If no lower bound is known, this may be NaN.

Returns:
  lower bound, may be NaN

### getHigh

double getHigh()
Returns the upper bound of this span. If no upper bound is known, this may be NaN.

Returns:
  upper bound, may be NaN

### getFiniteBounds

double[] getFiniteBounds(boolean requirePositive)
Returns a 2-element array giving definite lower and upper bounds to be used for this span. The upper bound will be strictly greater than the lower bound. Optionally, both bounds can be required to be strictly greater than zero. If insufficient data is available to determine such return values, some reasonable defaults will be made up.

Parameters:
  `requirePositive` - whether output bounds must be positive
Returns:
  2-element array giving (lo,hi)

### createScaler

Scaler createScaler(Scaling scaling, Subrange dataclip)
Returns a scaler that maps a value range based on this span to the range 0..1, according to a given scaling. The supplied dataclip can adjust the input range so that it may not cover the whole extent of this span. Exactly how the dataclip subrange is interpreted is up to this span implementation.

Parameters:
  `scaling` - scale function
  `dataclip` - subrange of natural data extent of this span over which scaling should be performed
Returns:
  new scaler

### limit

Span limit(double lo, double hi)
Creates a new span based on this one with optionally adjusted data bounds.

Parameters:
  `lo` - lower bound of output span; if NaN has no effect
  `hi` - upper bound of output span; if NaN has no effect
Returns:
  new span