Trait Kernel

Source
pub trait Kernel<T: CoordNum> {
    // Provided methods
    fn orient2d(p: Coord<T>, q: Coord<T>, r: Coord<T>) -> Orientation { ... }
    fn square_euclidean_distance(p: Coord<T>, q: Coord<T>) -> T { ... }
    fn dot_product_sign(u: Coord<T>, v: Coord<T>) -> Orientation { ... }
}
Expand description

Kernel trait to provide predicates to operate on different scalar types.

Provided Methods§

Source

fn orient2d(p: Coord<T>, q: Coord<T>, r: Coord<T>) -> Orientation

Gives the orientation of 3 2-dimensional points: ccw, cw or collinear (None)

Source

fn square_euclidean_distance(p: Coord<T>, q: Coord<T>) -> T

Source

fn dot_product_sign(u: Coord<T>, v: Coord<T>) -> Orientation

Compute the sign of the dot product of u and v using robust predicates. The output is CounterClockwise if the sign is positive, Clockwise if negative, and Collinear if zero.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§