Skip to main content

Enlarge

Trait Enlarge 

Source
pub trait Enlarge<Alpha> {
    type Output;

    // Required method
    fn enlarge_with(&self, alpha: Alpha) -> Self::Output;
}
Expand description

Trait for enlarging a value by a given margin.

Required Associated Types§

Required Methods§

Source

fn enlarge_with(&self, alpha: Alpha) -> Self::Output

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl Enlarge<i32> for i32

Source§

fn enlarge_with(&self, alpha: i32) -> Interval<i32>

Enlarges a scalar to an interval: $\text{enlarge}(x, \alpha) = [x-\alpha,; x+\alpha]$

Source§

type Output = Interval<i32>

Implementors§

Source§

impl<T1, T2, Alpha> Enlarge<Alpha> for Point<T1, T2>
where T1: Enlarge<Alpha, Output = Interval<T1>> + Copy, T2: Enlarge<Alpha, Output = Interval<T2>> + Copy, Alpha: Copy,

Source§

impl<T> Enlarge<T> for Interval<T>
where T: Copy + Add<Output = T> + Sub<Output = T>,