## org.das2.datum.DomainDivider

Divides a given range of input values into useful intervals. This can be used, for example, to determine the locations of tick marks on an axis. Implementations will vary their behavior based on a number of factors including the type of data in question.

Note that the intervals need not be uniformly sized. For example, this would be the case when dividing a time interval into months, or into log spaced intervals.

Implementations should have protected constructors so factory methods in `DomainDividerUtil` can access them.

## MAX_BOUNDARIES

## boundaries

boundaries( Datum min, Datum max ) → org.das2.datum.DatumVector

Returns the boundaries between intervals on the given data range. When min or max lay on a boundary, it should be returned. Note this is inconsistent with DatumRange logic, where the max is exclusive. If min>&eq;max, then an empty list should be returned.

### Parameters

min - the lower bound
max - the upper bound

### Returns:

a `DatumVector` containing the boundary values
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## boundaryCount

boundaryCount( Datum min, Datum max ) → long

Compute the number of intervals produced by this `DomainDivider` on the given range. This allows the DomainDivider to indicate the number of intervals (e.g. a zillion) without having to enumerate them. When min or max lay on a boundary, it should be counted (inclusive max). If min>&eq;max, then zero should be returned.

### Parameters

min - a Datum
max - a Datum

### Returns:

a long
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## coarserDivider

coarserDivider( boolean superset ) → org.das2.datum.DomainDivider

Return a new divider with larger intervals. If the `superset` parameter is true, the interval boundaries of the new divider are guaranteed to align with (some) interval boundaries of the existing one. In other words, the existing divider will subdivide the new one.

### Parameters

superset - true to force boundary alignment with the calling `DomainDivider`. For a given range, the boundaries will be aligned.

### Returns:

the new DomainDivider object
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## finerDivider

finerDivider( boolean superset ) → org.das2.datum.DomainDivider

Return a new divider with smaller intervals. If the `superset` parameter is true, the interval boundaries of the existing divider are guaranteed to align with (some) intervals of the new one. In other words, the new divider will subdivide the existing one.

### Parameters

superset - true to force boundary alignment with the calling `DomainDivider` For a given range, the boundaries will be aligned.

### Returns:

the new DomainDivider object
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## rangeContaining

rangeContaining( Datum v ) → DatumRange

Return a `DatumRange` representing the interval containing the given value.

### Parameters

v - a Datum

### Returns:

the range containing a given value.
[search for examples] [view on GitHub] [view on old javadoc] [view source]