Trait tpntree::Coordinates
source · pub trait Coordinates<const N: usize> {
fn coordinates(&self) -> &[f64];
}
Expand description
Coordinates
is required for a type to be used inside a tpntree::SpatialTree
.
Be sure to return a slice of a length equal to const generic type parameter N.
Required Methods§
fn coordinates(&self) -> &[f64]
Implementations on Foreign Types§
source§impl<const N: usize> Coordinates<N> for [f64; N]
impl<const N: usize> Coordinates<N> for [f64; N]
source§fn coordinates(&self) -> &[f64]
fn coordinates(&self) -> &[f64]
Blanket implementation for arrays of length N.
source§impl<const N: usize> Coordinates<N> for Vec<f64>
impl<const N: usize> Coordinates<N> for Vec<f64>
source§fn coordinates(&self) -> &[f64]
fn coordinates(&self) -> &[f64]
Blanket implementation for vectors.
Panics if the length of the vec is different from N.