DiscountedFusion

Trait DiscountedFusion 

Source
pub trait DiscountedFusion {
    // Required method
    fn size_range(&self) -> RangeInclusive<usize>;

    // Provided methods
    fn fuse<L, F>(
        &self,
        lattice: &L,
        referee: &F,
        bbas: &[&Assignment<L::Item>],
    ) -> Result<(Assignment<L::Item>, f64slx), String>
       where L: Lattice,
             L::Item: Eq + Ord + Hash,
             F: Referee { ... }
    fn fuse_seq<L, F, I>(
        &self,
        lattice: &L,
        referees: &[&F],
        slice_bbas: &[&[&Assignment<L::Item>]],
    ) -> Result<I::Type<(Assignment<L::Item>, f64slx)>, String>
       where L: Lattice,
             L::Item: Eq + Ord + Hash,
             F: Referee,
             I: CollectionFamily1 { ... }
}
Expand description

Trait defining generic discounted fusion processes

  • Smallest assignments are reduced until assignment cardinal is below given range

Required Methods§

Source

fn size_range(&self) -> RangeInclusive<usize>

Range defining an hysteresis for assignment reduction

  • Principle:
    1. Reduction is started when above range max
    2. Reduction is done until below or equal to range min
  • Reduction strategy is defined by means of AssignmentBuilder mechanisms

Provided Methods§

Source

fn fuse<L, F>( &self, lattice: &L, referee: &F, bbas: &[&Assignment<L::Item>], ) -> Result<(Assignment<L::Item>, f64slx), String>
where L: Lattice, L::Item: Eq + Ord + Hash, F: Referee,

Fusing bbas returning fused assignment and conflict

  • lattice: &L : lattice of definition of the assignments
  • referee: &F : referee function
  • bbas: &[&Assignment<L::Item>] : assignments sequence
  • L : type of the lattice
  • F : type of the referee function
  • Output: an error or a pair composed of:
    • the fused assignment
    • the conflict
Source

fn fuse_seq<L, F, I>( &self, lattice: &L, referees: &[&F], slice_bbas: &[&[&Assignment<L::Item>]], ) -> Result<I::Type<(Assignment<L::Item>, f64slx)>, String>
where L: Lattice, L::Item: Eq + Ord + Hash, F: Referee, I: CollectionFamily1,

fusing bbas sequentially returning collected fused assignments and conflicts

  • lattice: &L : lattice of definition of the assignments
  • referees: &[&F] : collection of referee functions
  • slice_bbas: &[&[&Assignment<L::Item>]] : collection of assignments sequence
  • L : type of the lattice
  • F : type of the referee function
  • I : type of the returned collection
  • Output: an error or a collection of pairs composed of:
    • a fused assignment
    • a conflict

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§