Struct ModalDblModel

Source
pub struct ModalDblModel<Id, ThId, S = RandomState> { /* private fields */ }
Expand description

A model of a modal double theory.

Implementations§

Source§

impl<Id, ThId, S> ModalDblModel<Id, ThId, S>

Source

pub fn new(theory: Rc<ModalDblTheory<ThId, S>>) -> Self

Creates an empty model of the given theory.

Trait Implementations§

Source§

impl<Id, ThId, S> Category for ModalDblModel<Id, ThId, S>
where Id: Eq + Clone + Hash + Debug, ThId: Eq + Clone + Hash + Debug, S: BuildHasher,

Source§

type Ob = ModalOb<Id, ThId>

Type of objects in category.
Source§

type Mor = ModalMor<Id, ThId>

Type of morphisms in category.
Source§

fn has_ob(&self, ob: &Self::Ob) -> bool

Does the category contain the value as an object?
Source§

fn has_mor(&self, mor: &Self::Mor) -> bool

Does the category contain the value as a morphism?
Source§

fn dom(&self, mor: &Self::Mor) -> Self::Ob

Gets the domain of a morphism in the category.
Source§

fn cod(&self, mor: &Self::Mor) -> Self::Ob

Gets the codomain of a morphism in the category.
Source§

fn compose(&self, path: Path<Self::Ob, Self::Mor>) -> Self::Mor

Composes a path of morphisms in the category.
Source§

fn compose2(&self, f: Self::Mor, g: Self::Mor) -> Self::Mor

Composes a pair of morphisms with compatible (co)domains.
Source§

fn id(&self, x: Self::Ob) -> Self::Mor

Constructs the identity morphism at an object.
Source§

fn morphisms_are_equal(&self, f: Self::Mor, g: Self::Mor) -> bool

Are the two morphisms in the category equal? Read more
Source§

impl<Id: Clone, ThId: Clone, S: Clone> Clone for ModalDblModel<Id, ThId, S>

Source§

fn clone(&self) -> ModalDblModel<Id, ThId, S>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Id, ThId, S> DblModel for ModalDblModel<Id, ThId, S>
where Id: Eq + Clone + Hash + Debug, ThId: Eq + Clone + Hash + Debug, S: BuildHasher,

Source§

type ObType = ModeApp<ThId>

Rust type of object types defined in the theory.
Source§

type MorType = ShortPath<ModeApp<ThId>, ModeApp<ThId>>

Rust type of morphism types defined in the theory.
Source§

type ObOp = Path<ModeApp<ThId>, ModeApp<ModalOp<ThId>>>

Type of operations on objects defined in the theory.
Source§

type MorOp = DblTree<Path<ModeApp<ThId>, ModeApp<ModalOp<ThId>>>, ShortPath<ModeApp<ThId>, ModeApp<ThId>>, ModalNode<ThId>>

Type of operations on morphisms defined in the theory.
Source§

type Theory = ModalDblTheory<ThId, S>

The type of double theory that this is a model of.
Source§

fn theory(&self) -> &Self::Theory

The double theory that this model is a model of.
Source§

fn ob_type(&self, ob: &Self::Ob) -> Self::ObType

Type of an object.
Source§

fn mor_type(&self, mor: &Self::Mor) -> Self::MorType

Type of a morphism.
Source§

fn ob_act(&self, ob: Self::Ob, path: &Self::ObOp) -> Self::Ob

Acts on an object with an object operation.
Source§

fn mor_act( &self, path: Path<Self::Ob, Self::Mor>, tree: &Self::MorOp, ) -> Self::Mor

Acts on a sequence of morphisms with a morphism operation.
Source§

impl<Id, ThId, S> FgCategory for ModalDblModel<Id, ThId, S>
where Id: Eq + Clone + Hash + Debug, ThId: Eq + Clone + Hash + Debug, S: BuildHasher,

Source§

type ObGen = Id

Type of an object generator. Read more
Source§

type MorGen = Id

Type of a morphism generator Read more
Source§

fn ob_generators(&self) -> impl Iterator<Item = Self::ObGen>

Iterates over object generators.
Source§

fn mor_generators(&self) -> impl Iterator<Item = Self::MorGen>

Iterates over morphism generators.
Source§

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

The codomain of a morphism generator
Source§

fn objects(&self) -> impl Iterator<Item = Self::Ob>

Iterates over basic objects.
Source§

fn morphisms(&self) -> impl Iterator<Item = Self::Mor>

Iterates over basic morphisms.
Source§

impl<Id, ThId, S> FgDblModel for ModalDblModel<Id, ThId, S>
where Id: Eq + Clone + Hash + Debug, ThId: Eq + Clone + Hash + Debug, S: BuildHasher,

Source§

fn ob_generator_type(&self, id: &Self::ObGen) -> Self::ObType

Type of an object generator.
Source§

fn mor_generator_type(&self, id: &Self::MorGen) -> Self::MorType

Type of a morphism generator.
Source§

fn ob_generators_with_type( &self, typ: &Self::ObType, ) -> impl Iterator<Item = Self::ObGen>

Iterates over object generators with the given object type.
Source§

fn mor_generators_with_type( &self, typ: &Self::MorType, ) -> impl Iterator<Item = Self::MorGen>

Iterates over morphism generators with the given morphism type.
Source§

fn objects_with_type( &self, obtype: &Self::ObType, ) -> impl Iterator<Item = Self::Ob>

Iterators over basic objects with the given object type.
Source§

fn morphisms_with_type( &self, mortype: &Self::MorType, ) -> impl Iterator<Item = Self::Mor>

Iterates over basic morphisms with the given morphism type.
Source§

impl<Id, ThId, S> MutDblModel for ModalDblModel<Id, ThId, S>
where Id: Eq + Clone + Hash + Debug, ThId: Eq + Clone + Hash + Debug, S: BuildHasher,

Source§

fn add_ob(&mut self, x: Self::ObGen, ob_type: Self::ObType)

Adds an object generator to the model.
Source§

fn add_mor( &mut self, f: Self::MorGen, dom: Self::Ob, cod: Self::Ob, mor_type: Self::MorType, )

Adds a morphism generator to the model.
Source§

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>

Gets the domain of a morphism generator, if it is set.
Source§

fn get_cod(&self, f: &Self::MorGen) -> Option<&Self::Ob>

Gets the codomain of a morphism generator, if it is set.
Source§

fn set_dom(&mut self, f: Self::MorGen, x: Self::Ob)

Sets the domain of a morphism generator.
Source§

fn set_cod(&mut self, f: Self::MorGen, x: Self::Ob)

Sets the codomain of a morphism generator.

Auto Trait Implementations§

§

impl<Id, ThId, S> Freeze for ModalDblModel<Id, ThId, S>

§

impl<Id, ThId, S> RefUnwindSafe for ModalDblModel<Id, ThId, S>

§

impl<Id, ThId, S = RandomState> !Send for ModalDblModel<Id, ThId, S>

§

impl<Id, ThId, S = RandomState> !Sync for ModalDblModel<Id, ThId, S>

§

impl<Id, ThId, S> Unpin for ModalDblModel<Id, ThId, S>
where Id: Unpin, ThId: Unpin,

§

impl<Id, ThId, S> UnwindSafe for ModalDblModel<Id, ThId, S>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

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

Checks if self is actually part of its subset T (and can be converted to it).
§

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

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.