[][src]Trait acap::coords::Coordinates

pub trait Coordinates {
    type Value: Value;
    fn dims(&self) -> usize;
fn coord(&self, i: usize) -> Self::Value; fn as_vec(&self) -> Vec<Self::Value> { ... } }

A coordinate space.

Associated Types

type Value: Value

The type of individual coordinates.

Loading content...

Required methods

fn dims(&self) -> usize

Get the number of dims this point has.

fn coord(&self, i: usize) -> Self::Value

Get the ith coordinate of this point.

Loading content...

Provided methods

fn as_vec(&self) -> Vec<Self::Value>

Create a vector with this point's coordinates as values.

Loading content...

Implementations on Foreign Types

impl<T: Value> Coordinates for [T][src]

Coordinates implementation for slices.

type Value = T

impl<T: Value> Coordinates for [T; 1][src]

type Value = T

impl<T: Value> Coordinates for [T; 2][src]

type Value = T

impl<T: Value> Coordinates for [T; 3][src]

type Value = T

impl<T: Value> Coordinates for [T; 4][src]

type Value = T

impl<T: Value> Coordinates for [T; 5][src]

type Value = T

impl<T: Value> Coordinates for [T; 6][src]

type Value = T

impl<T: Value> Coordinates for [T; 7][src]

type Value = T

impl<T: Value> Coordinates for [T; 8][src]

type Value = T

impl<T: Value> Coordinates for Vec<T>[src]

Coordinates implemention for vectors.

type Value = T

impl<'_, T: ?Sized + Coordinates> Coordinates for &'_ T[src]

Blanket Coordinates implementation for references.

type Value = T::Value

Loading content...

Implementors

impl<T: Coordinates> Coordinates for Chebyshev<T>[src]

type Value = T::Value

impl<T: Coordinates> Coordinates for Euclidean<T>[src]

type Value = T::Value

impl<T: Coordinates> Coordinates for Taxicab<T>[src]

type Value = T::Value

Loading content...