Trait lattices::LatticeBimorphism

source ·
pub trait LatticeBimorphism<LatA, LatB> {
    type Output;

    // Required method
    fn call(&mut self, lat_a: LatA, lat_b: LatB) -> Self::Output;
}
Expand description

Semilattice bimorphism. Lattice merge must distribute over this binary function, in both arguments.

Use crate::test::check_lattice_bimorphism to spot-test an implementation.

See the lattice math doc’s lattice bimorphism section.

Required Associated Types§

source

type Output

The output lattice type.

Required Methods§

source

fn call(&mut self, lat_a: LatA, lat_b: LatB) -> Self::Output

Executes the function.

Implementors§

source§

impl<'a, 'b, GhtA, GhtB, GhtOut> LatticeBimorphism<&'a GhtA, &'b GhtB> for GhtCartesianProductBimorphism<GhtOut>
where GhtA: GeneralizedHashTrieNode, GhtA::Storage: VariadicSet<Schema = GhtA::Schema>, GhtB: GeneralizedHashTrieNode, GhtB::Storage: VariadicSet<Schema = GhtB::Schema>, GhtOut: FromIterator<<GhtA::SuffixSchema as VariadicExt>::Extend<GhtB::SuffixSchema>>, GhtA::SuffixSchema: CloneVariadic, GhtB::SuffixSchema: CloneVariadic,

source§

type Output = GhtOut

source§

impl<'a, 'b, GhtA, GhtB, GhtOut> LatticeBimorphism<&'a GhtA, &'b GhtB> for GhtValTypeProductBimorphism<GhtOut>
where GhtA: GeneralizedHashTrieNode, GhtA::Storage: VariadicSet<Schema = GhtA::Schema>, GhtB: GeneralizedHashTrieNode, GhtB::Storage: VariadicSet<Schema = GhtB::Schema>, GhtOut: FromIterator<<GhtA::Schema as VariadicExt>::Extend<GhtB::ValType>>, GhtA::Schema: Eq + Hash + CloneVariadic, GhtB::Schema: Eq + Hash + SplitBySuffix<GhtB::ValType>, GhtB::ValType: CloneVariadic,

source§

type Output = GhtOut

source§

impl<'a, 'b, Head, GhtA, GhtB, ValFunc> LatticeBimorphism<&'a GhtA, &'b GhtB> for GhtNodeKeyedBimorphism<ValFunc>
where Head: Clone + Hash + Eq, ValFunc: LatticeBimorphism<&'a GhtA::Get, &'b GhtB::Get>, ValFunc::Output: GeneralizedHashTrieNode, GhtA: GeneralizedHashTrieNode<Head = Head> + GhtGet, GhtB: GeneralizedHashTrieNode<Head = Head, Schema = GhtA::Schema> + GhtGet, GhtA::Storage: VariadicSet<Schema = GhtA::Schema>, GhtB::Storage: VariadicSet<Schema = GhtB::Schema>, <GhtA::SuffixSchema as VariadicExt>::AsRefVar<'a>: CloneVariadic, <GhtB::SuffixSchema as VariadicExt>::AsRefVar<'b>: CloneVariadic,

bimorphism implementation for equijoining Ght Nodes

source§

type Output = GhtInner<Head, <ValFunc as LatticeBimorphism<&'a <GhtA as GhtGet>::Get, &'b <GhtB as GhtGet>::Get>>::Output>

source§

impl<GhtA, GhtB, ValFunc, GhtOut> LatticeBimorphism<GhtA, GhtB> for GhtBimorphism<ValFunc>
where GhtA: GeneralizedHashTrieNode, GhtA::Storage: VariadicSet<Schema = GhtA::Schema>, GhtB: GeneralizedHashTrieNode, GhtB::Storage: VariadicSet<Schema = GhtB::Schema>, GhtOut: GeneralizedHashTrieNode, for<'a, 'b> ValFunc: LatticeBimorphism<&'a GhtA, &'b GhtB, Output = GhtOut>,

source§

type Output = GhtOut

source§

impl<LatA, LatB> LatticeBimorphism<LatA, LatB> for PairBimorphism

source§

type Output = Pair<LatA, LatB>

source§

impl<MapA, MapB, MapOut, ValFunc> LatticeBimorphism<MapUnion<MapA>, MapUnion<MapB>> for KeyedBimorphism<MapOut, ValFunc>
where ValFunc: LatticeBimorphism<MapA::Item, MapB::Item>, MapA: MapIter + SimpleKeyedRef + SimpleCollectionRef, MapB: for<'a> GetKeyValue<&'a MapA::Key, Key = MapA::Key> + SimpleCollectionRef, MapA::Key: Clone + Eq, MapA::Item: Clone, MapB::Item: Clone, MapOut: Default + MapInsert<MapA::Key> + Collection<Item = ValFunc::Output>,

source§

type Output = MapUnion<MapOut>

source§

impl<SetA, SetB, SetOut> LatticeBimorphism<SetUnion<SetA>, SetUnion<SetB>> for CartesianProductBimorphism<SetOut>
where SetA: IntoIterator, SetB: Iter + SimpleCollectionRef, SetA::Item: Clone, SetB::Item: Clone, SetOut: FromIterator<(SetA::Item, SetB::Item)>,

source§

type Output = SetUnion<SetOut>