pub struct DiscreteTabModel { /* private fields */ }
Expand description
A finitely presented model of a discrete tabulator theory.
A model of a discrete tabulator theory is a normal lax functor from the theory into the double category of profunctors that preserves tabulators. For the definition of “preserving tabulators,” see the dev docs.
Implementations§
Source§impl DiscreteTabModel
impl DiscreteTabModel
Sourcepub fn new(theory: Rc<DiscreteTabTheory>) -> Self
pub fn new(theory: Rc<DiscreteTabTheory>) -> Self
Creates an empty model of the given theory.
Sourcepub fn tabulated(&self, mor: TabMor) -> TabOb
pub fn tabulated(&self, mor: TabMor) -> TabOb
Convenience method to turn a morphism into an object.
Sourcepub fn tabulated_gen(&self, f: QualifiedName) -> TabOb
pub fn tabulated_gen(&self, f: QualifiedName) -> TabOb
Convenience method to turn a morphism generator into an object.
Sourcepub fn iter_invalid(&self) -> impl Iterator<Item = InvalidDblModel> + '_
pub fn iter_invalid(&self) -> impl Iterator<Item = InvalidDblModel> + '_
Iterates over failures of model to be well defined.
Trait Implementations§
Source§impl Category for DiscreteTabModel
impl Category for DiscreteTabModel
Source§fn has_mor(&self, path: &Self::Mor) -> bool
fn has_mor(&self, path: &Self::Mor) -> bool
Does the category contain the value as a morphism?
Source§fn compose(&self, path: Path<Self::Ob, Self::Mor>) -> Self::Mor
fn compose(&self, path: Path<Self::Ob, Self::Mor>) -> Self::Mor
Composes a path of morphisms in the category.
Source§impl Clone for DiscreteTabModel
impl Clone for DiscreteTabModel
Source§fn clone(&self) -> DiscreteTabModel
fn clone(&self) -> DiscreteTabModel
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl DblModel for DiscreteTabModel
impl DblModel for DiscreteTabModel
Source§impl FgCategory for DiscreteTabModel
impl FgCategory for DiscreteTabModel
Source§type ObGen = QualifiedName
type ObGen = QualifiedName
Type of an object generator. Read more
Source§type MorGen = QualifiedName
type MorGen = QualifiedName
Type of a morphism generator Read more
Source§fn ob_generators(&self) -> impl Iterator<Item = Self::ObGen>
fn ob_generators(&self) -> impl Iterator<Item = Self::ObGen>
Iterates over object generators.
Source§fn mor_generators(&self) -> impl Iterator<Item = Self::MorGen>
fn mor_generators(&self) -> impl Iterator<Item = Self::MorGen>
Iterates over morphism generators.
Source§fn mor_generator_dom(&self, f: &Self::MorGen) -> Self::Ob
fn mor_generator_dom(&self, f: &Self::MorGen) -> Self::Ob
The domain of a morphism generator
Source§fn mor_generator_cod(&self, f: &Self::MorGen) -> Self::Ob
fn mor_generator_cod(&self, f: &Self::MorGen) -> Self::Ob
The codomain of a morphism generator
Source§impl FgDblModel for DiscreteTabModel
impl FgDblModel for DiscreteTabModel
Source§fn ob_generator_type(&self, ob: &Self::ObGen) -> Self::ObType
fn ob_generator_type(&self, ob: &Self::ObGen) -> Self::ObType
Type of an object generator.
Source§fn mor_generator_type(&self, mor: &Self::MorGen) -> Self::MorType
fn mor_generator_type(&self, mor: &Self::MorGen) -> Self::MorType
Type of a morphism generator.
Source§fn ob_generators_with_type(
&self,
obtype: &Self::ObType,
) -> impl Iterator<Item = Self::ObGen>
fn ob_generators_with_type( &self, obtype: &Self::ObType, ) -> impl Iterator<Item = Self::ObGen>
Iterates over object generators with the given object type.
Source§fn mor_generators_with_type(
&self,
mortype: &Self::MorType,
) -> impl Iterator<Item = Self::MorGen>
fn mor_generators_with_type( &self, mortype: &Self::MorType, ) -> impl Iterator<Item = Self::MorGen>
Iterates over morphism generators with the given morphism type.
Source§impl MutDblModel for DiscreteTabModel
impl MutDblModel for DiscreteTabModel
Source§fn add_ob(&mut self, x: Self::ObGen, ob_type: Self::ObType)
fn add_ob(&mut self, x: Self::ObGen, ob_type: Self::ObType)
Adds an object generator to the model.
Source§fn make_mor(&mut self, f: Self::MorGen, mor_type: Self::MorType)
fn make_mor(&mut self, f: Self::MorGen, mor_type: Self::MorType)
Adds a morphism generator to the model without setting its (co)domain.
Source§fn get_dom(&self, f: &Self::MorGen) -> Option<&Self::Ob>
fn get_dom(&self, f: &Self::MorGen) -> Option<&Self::Ob>
Gets the domain of a morphism generator, if it is set.
Source§fn get_cod(&self, f: &Self::MorGen) -> Option<&Self::Ob>
fn get_cod(&self, f: &Self::MorGen) -> Option<&Self::Ob>
Gets the codomain of a morphism generator, if it is set.
Source§impl PartialEq for DiscreteTabModel
impl PartialEq for DiscreteTabModel
Source§impl Validate for DiscreteTabModel
impl Validate for DiscreteTabModel
Source§type ValidationError = InvalidDblModel
type ValidationError = InvalidDblModel
The type of a validation error. Read more
impl Eq for DiscreteTabModel
Auto Trait Implementations§
impl Freeze for DiscreteTabModel
impl RefUnwindSafe for DiscreteTabModel
impl !Send for DiscreteTabModel
impl !Sync for DiscreteTabModel
impl Unpin for DiscreteTabModel
impl UnwindSafe for DiscreteTabModel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.