Expand description
This crate enables generalized Interval representation and operations
Supporting generic bound data types (e.g. compatible with units-of-measure to enable typechecked physical units) - and supporting all necessary Interval representations for closure of interval operations. See README.md for detailed design discussion.
§Examples
use intervals_general::bound_pair::BoundPair;
use intervals_general::interval::Interval;
let bounds = BoundPair::new(1.0, 2.0).ok_or("invalid BoundPair")?;
let right_half_open = Interval::RightHalfOpen { bound_pair: bounds }; // [1.0, 2.0)
§Requirements
§Support For
- Intervals with bound data types provied via generic
- Open, closed and half-open Intervals
- Type-enforced representation of the empty Interval
- Type-enforced representation of unbounded Intervals
§Implementation Constraints
- no_std support
- No use of of panic, assert
- Minimize error handling by design
- Make the library hard to use incorrectly
Re-exports§
pub use interval::Interval;