pub struct Euclidean<const N: usize>;Expand description
The Euclidean space R^N with states [f64; N] and straight-line interpolation.
Trait Implementations§
impl<const N: usize> Copy for Euclidean<N>
impl<const N: usize> Eq for Euclidean<N>
Source§impl<const N: usize> NearestNeighbors<Euclidean<N>> for KdTree<N>
impl<const N: usize> NearestNeighbors<Euclidean<N>> for KdTree<N>
Source§fn nearest(&self, space: &Euclidean<N>, query: &[f64; N]) -> Option<usize>
fn nearest(&self, space: &Euclidean<N>, query: &[f64; N]) -> Option<usize>
The id of the node closest to
query, or None if the structure is empty.Source§fn within_radius(
&self,
space: &Euclidean<N>,
query: &[f64; N],
radius: f64,
out: &mut Vec<usize>,
)
fn within_radius( &self, space: &Euclidean<N>, query: &[f64; N], radius: f64, out: &mut Vec<usize>, )
Replaces the contents of
out with the ids of all nodes within radius of query,
in insertion order.Source§impl<const N: usize> RemovableNeighbors<Euclidean<N>> for KdTree<N>
impl<const N: usize> RemovableNeighbors<Euclidean<N>> for KdTree<N>
Source§fn remove(&mut self, id: usize) -> bool
fn remove(&mut self, id: usize) -> bool
Removes the node with id in O(log n) amortized.
The node is first marked as removed and keeps splitting space. Once removed nodes
outnumber live ones, the tree is rebuilt balanced over the live nodes
(KdTree::rebalance), so memory and query cost track the live node count.
Source§impl<const N: usize> StateSpace for Euclidean<N>
impl<const N: usize> StateSpace for Euclidean<N>
Source§fn dimension(&self) -> usize
fn dimension(&self) -> usize
The number of degrees of freedom; feeds the RRT*/PRM* connection radius.
Source§fn distance(&self, from: &[f64; N], to: &[f64; N]) -> f64
fn distance(&self, from: &[f64; N], to: &[f64; N]) -> f64
The distance between two configurations. Read more
Source§fn is_euclidean(&self) -> bool
fn is_euclidean(&self) -> bool
Whether states are coordinate vectors,
StateSpace::distance is the Euclidean norm of
their difference and StateSpace::interpolate the straight line. Read moreimpl<const N: usize> StructuralPartialEq for Euclidean<N>
Auto Trait Implementations§
impl<const N: usize> Forget for Euclidean<N>
impl<const N: usize> Freeze for Euclidean<N>
impl<const N: usize> Move for Euclidean<N>
impl<const N: usize> RefUnwindSafe for Euclidean<N>
impl<const N: usize> Send for Euclidean<N>
impl<const N: usize> Sync for Euclidean<N>
impl<const N: usize> Unpin for Euclidean<N>
impl<const N: usize> UnsafeUnpin for Euclidean<N>
impl<const N: usize> UnwindSafe for Euclidean<N>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more