use-interval
Install
[]
= "0.0.5"
What belongs here
use-interval owns reusable interval and bound primitives. It provides open,
closed, half-open, and unbounded intervals together with small operations such
as containment, overlap, emptiness checks, and intersection.
The crate stays intentionally narrow and dependency-free so adjacent crates can reuse interval semantics without pulling in domain-specific policy.
Neighboring crates
| Crate | Responsibility |
|---|---|
use-interval |
Generic interval and bound primitives |
use-real |
Real-number abstractions, validated finite values, and comparisons |
use-calculus |
Numerical methods that may consume intervals |
use-probability |
Probability-specific interval interpretations |
use-statistics |
Statistical confidence intervals and descriptive interpretation |
use-geometry |
Geometry-specific bounds, boxes, and spatial interval compositions |
use-optimization |
Optimization algorithms and interval-based search strategies |
use-interval intentionally does not define confidence interval types,
geometry-specific bounding boxes, unit-aware intervals, or equation-solving
algorithms.
Examples
Containment
use Interval;
let interval = closed;
assert!;
assert!;
assert!;
assert!;
Overlap and excluded endpoints
use Interval;
let left = closed;
let right = open;
assert!;
assert_eq!;
Intersection with an included shared endpoint
use Interval;
let left = closed;
let right = closed;
assert!;
assert_eq!;
Status
use-interval is a concrete pre-1.0 crate in the RustUse math workspace. The
API stays explicit and conservative so crates like use-real,
use-calculus, use-probability, and use-optimization can share one small
interval vocabulary without inheriting domain-specific abstractions.