ocean.math.Range

Simple integer range struct with various comparison functions.

Note that the range template currently only supports unsigned integer types. It would be possible to extend it to also work with signed and/or floating point types.

Members

Functions

extent
Range!(T) extent(Range!(T)[] ranges)

Generate a single Range!T that covers the entire set of values found in an array of Range!T, i.e. whose min, max values reflect the smallest and largest min and max found in the array.

hasGap
bool hasGap(Range!(T)[] ranges)

Predicate that checks for the existence of one or more gaps in an array of Range!T.

hasOverlap
bool hasOverlap(Range!(T)[] ranges)

Predicate that checks for the existence of overlaps in array of Range!T.

isContiguous
bool isContiguous(Range!(T)[] ranges)

Predicate that checks contiguity of the array of Range!T.

Structs

Range
struct Range(T)

Range struct template

Meta

License

Boost Software License Version 1.0. See LICENSE_BOOST.txt for details. Alternatively, this file may be distributed under the terms of the Tango 3-Clause BSD License (see LICENSE_BSD.txt for details).