catlog::dbl::model_diagram

Type Alias DiscreteDblModelDiagram

Source
pub type DiscreteDblModelDiagram<DomId, CodId, Cat> = DblModelDiagram<DiscreteDblModelMapping<DomId, CodId>, DiscreteDblModel<DomId, Cat>>;
Expand description

A diagram in a model of a discrete double theory.

Aliased Type§

struct DiscreteDblModelDiagram<DomId, CodId, Cat>(pub DiscreteDblModelMapping<DomId, CodId>, pub DiscreteDblModel<DomId, Cat>);

Fields§

§0: DiscreteDblModelMapping<DomId, CodId>§1: DiscreteDblModel<DomId, Cat>

Implementations§

Source§

impl<DomId, CodId, Cat> DiscreteDblModelDiagram<DomId, CodId, Cat>
where DomId: Eq + Clone + Hash, CodId: Eq + Clone + Hash, Cat: FgCategory, Cat::Ob: Hash, Cat::Mor: Hash,

Source

pub fn validate_in( &self, model: &DiscreteDblModel<CodId, Cat>, ) -> Result<(), NonEmpty<InvalidDiscreteDblModelDiagram<DomId>>>

Validates that the diagram is well-defined in the given model.

Assumes that the model is valid. If it is not, this function may panic.

Source

pub fn iter_invalid_in<'a>( &'a self, model: &'a DiscreteDblModel<CodId, Cat>, ) -> impl Iterator<Item = InvalidDiscreteDblModelDiagram<DomId>> + 'a

Iterates over failures of the diagram to be valid in the given model.

Source

pub fn infer_missing_from(&mut self, model: &DiscreteDblModel<CodId, Cat>)

Infer missing data in the diagram from the model, where possible.

Assumes that the model is valid.