Trait geo::algorithm::kernels::Kernel [−][src]
pub trait Kernel<T: CoordNum> {
fn orient2d(
p: Coordinate<T>,
q: Coordinate<T>,
r: Coordinate<T>
) -> Orientation { ... }
fn square_euclidean_distance(p: Coordinate<T>, q: Coordinate<T>) -> T { ... }
fn dot_product_sign(u: Coordinate<T>, v: Coordinate<T>) -> Orientation { ... }
}
Expand description
Kernel trait to provide predicates to operate on different scalar types.
Provided methods
fn orient2d(p: Coordinate<T>, q: Coordinate<T>, r: Coordinate<T>) -> Orientation
fn orient2d(p: Coordinate<T>, q: Coordinate<T>, r: Coordinate<T>) -> Orientation
Gives the orientation of 3 2-dimensional points: ccw, cw or collinear (None)
fn square_euclidean_distance(p: Coordinate<T>, q: Coordinate<T>) -> T
fn dot_product_sign(u: Coordinate<T>, v: Coordinate<T>) -> Orientation
fn dot_product_sign(u: Coordinate<T>, v: Coordinate<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.