algebraeon_geometry::simplexes

Trait LabelledSimplexCollection

Source
pub trait LabelledSimplexCollection<FS: OrderedRingStructure + FieldStructure, SP: Borrow<AffineSpace<FS>> + Clone, T: Eq + Clone>: Sized
where FS::Set: Hash,
{ type WithLabel<S: Eq + Clone>: LabelledSimplexCollection<FS, SP, S>; type SubsetType: LabelledSimplexCollection<FS, SP, T>;
Show 19 methods // Required methods fn new_labelled( ambient_space: SP, simplexes: HashMap<Simplex<FS, SP>, T>, ) -> Result<Self, &'static str>; fn new_labelled_unchecked( ambient_space: SP, simplexes: HashMap<Simplex<FS, SP>, T>, ) -> Self; fn ambient_space(&self) -> SP; fn labelled_simplexes(&self) -> HashMap<&Simplex<FS, SP>, &T>; fn into_labelled_simplexes(self) -> HashMap<Simplex<FS, SP>, T>; fn into_partial_simplicial_complex( self, ) -> LabelledPartialSimplicialComplex<FS, SP, T>; // Provided methods fn new( ambient_space: SP, simplexes: HashSet<Simplex<FS, SP>>, ) -> Result<Self::WithLabel<()>, &'static str> { ... } fn new_unchecked( ambient_space: SP, simplexes: HashSet<Simplex<FS, SP>>, ) -> Self::WithLabel<()> { ... } fn simplexes<'a>(&'a self) -> HashSet<&'a Simplex<FS, SP>> where T: 'a { ... } fn into_simplexes(self) -> HashSet<Simplex<FS, SP>> { ... } fn subset_by_label( &self, label: &T, ) -> <Self::SubsetType as LabelledSimplexCollection<FS, SP, T>>::WithLabel<()> { ... } fn into_subset_by_label( self, label: &T, ) -> <Self::SubsetType as LabelledSimplexCollection<FS, SP, T>>::WithLabel<()> { ... } fn subset_by_filter(&self, f: impl Fn(&T) -> bool) -> Self::SubsetType { ... } fn into_subset_by_filter(self, f: impl Fn(&T) -> bool) -> Self::SubsetType { ... } fn apply_label_function<S: Eq + Clone>( &self, f: impl Fn(&T) -> S, ) -> Self::WithLabel<S> { ... } fn into_apply_label_function<S: Eq + Clone>( self, f: impl Fn(T) -> S, ) -> Self::WithLabel<S> { ... } fn forget_labels(&self) -> Self::WithLabel<()> { ... } fn into_forget_labels(self) -> Self::WithLabel<()> { ... } fn common_label<'a>( &'a self, simplexes: impl Iterator<Item = &'a Simplex<FS, SP>>, ) -> Option<&'a T> where FS: 'a, SP: 'a { ... }
}

Required Associated Types§

Required Methods§

Source

fn new_labelled( ambient_space: SP, simplexes: HashMap<Simplex<FS, SP>, T>, ) -> Result<Self, &'static str>

Source

fn new_labelled_unchecked( ambient_space: SP, simplexes: HashMap<Simplex<FS, SP>, T>, ) -> Self

Source

fn ambient_space(&self) -> SP

Source

fn labelled_simplexes(&self) -> HashMap<&Simplex<FS, SP>, &T>

Source

fn into_labelled_simplexes(self) -> HashMap<Simplex<FS, SP>, T>

Source

fn into_partial_simplicial_complex( self, ) -> LabelledPartialSimplicialComplex<FS, SP, T>

Provided Methods§

Source

fn new( ambient_space: SP, simplexes: HashSet<Simplex<FS, SP>>, ) -> Result<Self::WithLabel<()>, &'static str>

Source

fn new_unchecked( ambient_space: SP, simplexes: HashSet<Simplex<FS, SP>>, ) -> Self::WithLabel<()>

Source

fn simplexes<'a>(&'a self) -> HashSet<&'a Simplex<FS, SP>>
where T: 'a,

Source

fn into_simplexes(self) -> HashSet<Simplex<FS, SP>>

Source

fn subset_by_label( &self, label: &T, ) -> <Self::SubsetType as LabelledSimplexCollection<FS, SP, T>>::WithLabel<()>

Source

fn into_subset_by_label( self, label: &T, ) -> <Self::SubsetType as LabelledSimplexCollection<FS, SP, T>>::WithLabel<()>

Source

fn subset_by_filter(&self, f: impl Fn(&T) -> bool) -> Self::SubsetType

Source

fn into_subset_by_filter(self, f: impl Fn(&T) -> bool) -> Self::SubsetType

Source

fn apply_label_function<S: Eq + Clone>( &self, f: impl Fn(&T) -> S, ) -> Self::WithLabel<S>

Source

fn into_apply_label_function<S: Eq + Clone>( self, f: impl Fn(T) -> S, ) -> Self::WithLabel<S>

Source

fn forget_labels(&self) -> Self::WithLabel<()>

Source

fn into_forget_labels(self) -> Self::WithLabel<()>

Source

fn common_label<'a>( &'a self, simplexes: impl Iterator<Item = &'a Simplex<FS, SP>>, ) -> Option<&'a T>
where FS: 'a, SP: 'a,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§