Skip to main content

ProObjectLimit

Struct ProObjectLimit 

Source
pub struct ProObjectLimit {
    pub levels: Vec<Vec<u32>>,
    pub projections: Vec<Vec<usize>>,
}
Expand description

Limit of a pro-object: a cofiltered inverse system of finite sets.

Stores a sequence of finite sets (levels) and projection maps between them. The limit is computed as the subset of the product consistent with all projections.

Fields§

§levels: Vec<Vec<u32>>

Each level is a finite set represented as Vec<u32>.

§projections: Vec<Vec<usize>>

projection[i] maps level i+1 → level i: projection[i][j] is the index in level i that element j of level i+1 maps to.

Implementations§

Source§

impl ProObjectLimit

Source

pub fn new(levels: Vec<Vec<u32>>, projections: Vec<Vec<usize>>) -> Self

Create a new pro-object from levels and projections.

Source

pub fn compute_limit(&self) -> Vec<Vec<usize>>

Compute the inverse limit: tuples (x_0, x_1, …, x_{n-1}) consistent with all projections.

A tuple is consistent if for each level i: projection[i][x_{i+1}] == x_i.

Source

pub fn limit_size(&self) -> usize

Return the cardinality of the computed inverse limit.

Auto Trait Implementations§

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.