Skip to main content

Projection

Trait Projection 

Source
pub trait Projection<S, const K: usize> {
    // Required method
    fn project(&self, state: &S) -> [f64; K];
}
Expand description

Maps a state to a point in a low-dimensional projection space, where KPIECE lays its grid.

A good projection keeps the coordinates that tell progress apart (the position of a robot, not its velocity). Any Fn(&S) -> [f64; K] closure is a projection.

Required Methods§

Source

fn project(&self, state: &S) -> [f64; K]

The projection of state.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<S, const K: usize, F: Fn(&S) -> [f64; K]> Projection<S, K> for F