Skip to main content

CubicalPath

Struct CubicalPath 

Source
pub struct CubicalPath<A: Clone> {
    pub dim: usize,
    /* private fields */
}
Expand description

A cubical path from a to b in type A, parameterized by dimension n.

Models the CCHM interval type: I^n → A.

Fields§

§dim: usize

Dimension of the path

Implementations§

Source§

impl<A: Clone + 'static> CubicalPath<A>

Source

pub fn constant(value: A) -> Self

Construct a constant path (degenerate, reflecting a point).

Source

pub fn from_fn(f: impl Fn(bool) -> A + 'static) -> Self

Construct a 1-dimensional path from a function [0,1] → A.

Source

pub fn at(&self, face: Vec<bool>) -> A

Evaluate the path at a face (a vector of booleans, one per dimension).

Source

pub fn left(&self) -> A

The left endpoint of the path (i = 0).

Source

pub fn right(&self) -> A

The right endpoint of the path (i = 1).

Source

pub fn face0(&self) -> A

Face map ∂₀ : sets the first dimension variable to 0.

Source

pub fn face1(&self) -> A

Face map ∂₁ : sets the first dimension variable to 1.

Source

pub fn meet(&self, j: bool) -> A

Connection ∧: the path i ↦ p(i ∧ j) for the constant j.

Source

pub fn join(&self, j: bool) -> A

Connection ∨: the path i ↦ p(i ∨ j) for the constant j.

Source

pub fn reverse(self) -> CubicalPath<A>
where A: 'static,

Reverse the path: i ↦ p(~i).

Auto Trait Implementations§

§

impl<A> Freeze for CubicalPath<A>

§

impl<A> !RefUnwindSafe for CubicalPath<A>

§

impl<A> !Send for CubicalPath<A>

§

impl<A> !Sync for CubicalPath<A>

§

impl<A> Unpin for CubicalPath<A>

§

impl<A> UnsafeUnpin for CubicalPath<A>

§

impl<A> !UnwindSafe for CubicalPath<A>

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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.