Trait Variance

Source
pub trait Variance {
    type Bound: Bound;

    // Required methods
    fn new() -> Self;
    fn clear(&mut self);
    fn add_bound(&mut self, bound: &Self::Bound);
    fn compute_axis(
        &self,
        n: <<Self::Bound as Bound>::Point as EuclideanSpace>::Scalar,
    ) -> (usize, <<Self::Bound as Bound>::Point as EuclideanSpace>::Scalar);
}
Expand description

Trait for variance calculation in sweep and prune algorithm

Required Associated Types§

Source

type Bound: Bound

Point type

Required Methods§

Source

fn new() -> Self

Create new variance object

Source

fn clear(&mut self)

Clear variance sums

Source

fn add_bound(&mut self, bound: &Self::Bound)

Add an extent to the variance sums

Source

fn compute_axis( &self, n: <<Self::Bound as Bound>::Point as EuclideanSpace>::Scalar, ) -> (usize, <<Self::Bound as Bound>::Point as EuclideanSpace>::Scalar)

Compute the sweep axis based on the internal values

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§