Skip to main content

Euclidean

Struct Euclidean 

Source
pub struct Euclidean<const N: usize>;
Expand description

The Euclidean space R^N with states [f64; N] and straight-line interpolation.

Trait Implementations§

Source§

impl<const N: usize> Clone for Euclidean<N>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<const N: usize> Copy for Euclidean<N>

Source§

impl<const N: usize> Debug for Euclidean<N>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<const N: usize> Default for Euclidean<N>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<const N: usize> Eq for Euclidean<N>

Source§

impl<const N: usize> NearestNeighbors<Euclidean<N>> for KdTree<N>

Source§

fn insert(&mut self, id: usize, state: [f64; N])

Adds a node with the given id.
Source§

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>, )

Replaces the contents of out with the ids of all nodes within radius of query, in insertion order.
Source§

fn k_nearest( &self, space: &Euclidean<N>, query: &[f64; N], k: usize, out: &mut Vec<usize>, )

Replaces the contents of out with the ids of the k nodes closest to query, closest first. Read more
Source§

fn len(&self) -> usize

The number of stored nodes.
Source§

fn is_empty(&self) -> bool

Whether no node is stored.
Source§

impl<const N: usize> PartialEq for Euclidean<N>

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<const N: usize> RemovableNeighbors<Euclidean<N>> for KdTree<N>

Source§

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>

Source§

type State = [f64; N]

A configuration. Cloned whenever a planner stores a node.
Source§

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

The distance between two configurations. Read more
Source§

fn interpolate(&self, from: &[f64; N], to: &[f64; N], t: f64) -> [f64; N]

The configuration at fraction t in [0, 1] of the way from from to to. Read more
Source§

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 more
Source§

impl<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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.