Type Alias UstrDiscreteTabModel

Source
pub type UstrDiscreteTabModel = DiscreteTabModel<Ustr, Ustr, BuildHasherDefault<IdentityHasher>>;
Expand description

A model of a discrete tabulator theory where both theory and model have keys of type Ustr.

Aliased Type§

struct UstrDiscreteTabModel { /* private fields */ }

Implementations

Source§

impl<Id, ThId, S> DiscreteTabModel<Id, ThId, S>
where Id: Eq + Clone + Hash, ThId: Eq + Clone + Hash, S: BuildHasher,

Source

pub fn new(theory: Arc<DiscreteTabTheory<ThId, ThId, S>>) -> Self

Creates an empty model of the given theory.

Source

pub fn tabulated(&self, mor: TabMor<Id, Id>) -> TabOb<Id, Id>

Convenience method to turn a morphism into an object.

Source

pub fn tabulated_gen(&self, f: Id) -> TabOb<Id, Id>

Convenience method to turn a morphism generator into an object.

Source

pub fn iter_invalid(&self) -> impl Iterator<Item = InvalidDblModel<Id>> + '_

Iterates over failures of model to be well defined.

Trait Implementations

Source§

impl<Id, ThId, S> Category for DiscreteTabModel<Id, ThId, S>
where Id: Eq + Clone + Hash,

Source§

type Ob = TabOb<Id, Id>

Type of objects in category.
Source§

type Mor = Path<TabOb<Id, Id>, TabEdge<Id, Id>>

Type of morphisms in category.
Source§

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

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

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

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

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

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

fn cod(&self, path: &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§

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

Source§

fn clone(&self) -> DiscreteTabModel<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 DiscreteTabModel<Id, ThId, S>
where Id: Eq + Clone + Hash, ThId: Eq + Clone + Hash, S: BuildHasher,

Source§

type ObType = TabObType<ThId, ThId>

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

type MorType = TabMorType<ThId, ThId>

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

type ObOp = Path<TabObType<ThId, ThId>, TabObProj<ThId, ThId>>

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

type MorOp = TabMorOp<ThId, ThId>

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

type Theory = DiscreteTabTheory<ThId, 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, _op: &Self::ObOp) -> Self::Ob

Acts on an object with an object operation.
Source§

fn mor_act(&self, _mor: Self::Mor, _op: &Self::MorOp) -> Self::Mor

Acts on a morphism with a morphism operation.
Source§

impl<Id, ThId, S> FgCategory for DiscreteTabModel<Id, ThId, S>
where Id: Eq + Clone + Hash,

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 DiscreteTabModel<Id, ThId, S>
where Id: Eq + Clone + Hash, ThId: Eq + Clone + Hash, S: BuildHasher,

Source§

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

Type of a morphism generator.
Source§

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>

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 DiscreteTabModel<Id, ThId, S>
where Id: Eq + Clone + Hash, ThId: Eq + Clone + Hash, S: BuildHasher,

Source§

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

Adds a basic object to the model.
Source§

fn make_mor(&mut self, f: Self::MorGen, mor_type: Self::MorType) -> bool

Adds a basic morphism to the model without setting its (co)domain.
Source§

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

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

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

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

fn set_dom(&mut self, f: Self::MorGen, x: Self::Ob) -> Option<Self::Ob>

Sets the domain of a basic morphism.
Source§

fn set_cod(&mut self, f: Self::MorGen, x: Self::Ob) -> Option<Self::Ob>

Sets the codomain of a basic morphism.
Source§

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

Adds a basic morphism to the model.
Source§

impl<Id, ThId, S> PartialEq for DiscreteTabModel<Id, ThId, S>
where Id: Eq + Hash, ThId: Eq + Hash,

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<Id, ThId, S> Validate for DiscreteTabModel<Id, ThId, S>
where Id: Eq + Clone + Hash, ThId: Eq + Clone + Hash, S: BuildHasher,

Source§

type ValidationError = InvalidDblModel<Id>

The type of a validation error. Read more
Source§

fn validate(&self) -> Result<(), NonEmpty<Self::ValidationError>>

Validates the object.
Source§

impl<Id, ThId, S> Eq for DiscreteTabModel<Id, ThId, S>
where Id: Eq + Hash, ThId: Eq + Hash,