Skip to main content

IntervalOps

Trait IntervalOps 

Source
pub trait IntervalOps:
    EnclosureOps<Midpoint = f64>
    + IntervalDatum
    + From<f64>
    + Neg<Output = Self>
    + Add<Output = Self>
    + Sub<Output = Self>
    + Mul<Output = Self>
    + Div<Output = Self>
    + Add<f64, Output = Self>
    + Sub<f64, Output = Self>
    + Mul<f64, Output = Self>
    + Div<f64, Output = Self>
    + AddAssign
    + SubAssign
    + MulAssign
    + DivAssign
    + AddAssign<f64>
    + SubAssign<f64>
    + MulAssign<f64>
    + DivAssign<f64> {
Show 19 methods // Required method fn new(inf: f64, sup: f64) -> Self; // Provided methods fn atan2(self, x: Self) -> Self { ... } fn sign(self) -> Self { ... } fn ceil(self) -> Self { ... } fn floor(self) -> Self { ... } fn trunc(self) -> Self { ... } fn round_ties_to_even(self) -> Self { ... } fn round_ties_to_away(self) -> Self { ... } fn abs(self) -> Self { ... } fn min(self, other: Self) -> Self { ... } fn max(self, other: Self) -> Self { ... } fn hypot(self, other: Self) -> Self { ... } fn cancel_minus(self, other: Self) -> Self { ... } fn cancel_plus(self, other: Self) -> Self { ... } fn hull_value(self, value: f64) -> Self { ... } fn bisect(self) -> (Self, Self) { ... } fn inf(self) -> f64 { ... } fn sup(self) -> f64 { ... } fn bounds(self) -> (f64, f64) { ... }
}
Expand description

Chaining-friendly operations specific to bare and decorated real intervals.

This trait is sealed transitively through IntervalDatum. It can be used as a public generic bound, but external crates cannot implement it.

Required Methods§

Source

fn new(inf: f64, sup: f64) -> Self

Constructs an interval from binary64 endpoints without reporting signals.

Provided Methods§

Source

fn atan2(self, x: Self) -> Self

Returns the two-argument angle enclosure atan2(self, x).

Source

fn sign(self) -> Self

Maps values to their signs.

Source

fn ceil(self) -> Self

Applies the ceiling function pointwise.

Source

fn floor(self) -> Self

Applies the floor function pointwise.

Source

fn trunc(self) -> Self

Applies truncation toward zero pointwise.

Source

fn round_ties_to_even(self) -> Self

Rounds pointwise to nearest integers with ties to even.

Source

fn round_ties_to_away(self) -> Self

Rounds pointwise to nearest integers with ties away from zero.

Source

fn abs(self) -> Self

Returns the absolute-value enclosure.

Source

fn min(self, other: Self) -> Self

Returns the pointwise-minimum enclosure.

Source

fn max(self, other: Self) -> Self

Returns the pointwise-maximum enclosure.

Source

fn hypot(self, other: Self) -> Self

Encloses sqrt(self² + other²).

Source

fn cancel_minus(self, other: Self) -> Self

Computes cancellative subtraction self ⊖ other.

Source

fn cancel_plus(self, other: Self) -> Self

Computes cancellative addition self ⊕ other.

Source

fn hull_value(self, value: f64) -> Self

Extends this interval’s hull to include value.

Source

fn bisect(self) -> (Self, Self)

Splits the interval at its midpoint into two covering intervals.

Source

fn inf(self) -> f64

Returns the lower endpoint, or NaN for NaI.

Source

fn sup(self) -> f64

Returns the upper endpoint, or NaN for NaI.

Source

fn bounds(self) -> (f64, f64)

Returns (lower, upper) endpoints.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§