Trait Init

Source
pub trait Init: Sized {
    type Oracle: SolveIncremental;
    type BlockClauseGen: Fn(Assignment) -> Clause;

    // Required method
    fn new<Cls>(
        clauses: Cls,
        objs: Vec<Objective>,
        var_manager: VarManager,
        opts: KernelOptions,
        block_clause_gen: Self::BlockClauseGen,
    ) -> Result<Self>
       where Cls: IntoIterator<Item = Clause>;

    // Provided method
    fn from_instance(
        inst: Instance,
        opts: KernelOptions,
        block_clause_gen: Self::BlockClauseGen,
    ) -> Result<Self> { ... }
}
Expand description

Trait for initializing algorithms

Required Associated Types§

Required Methods§

Source

fn new<Cls>( clauses: Cls, objs: Vec<Objective>, var_manager: VarManager, opts: KernelOptions, block_clause_gen: Self::BlockClauseGen, ) -> Result<Self>
where Cls: IntoIterator<Item = Clause>,

Initialization of the algorithm providing all optional input

Provided Methods§

Source

fn from_instance( inst: Instance, opts: KernelOptions, block_clause_gen: Self::BlockClauseGen, ) -> Result<Self>

Initialization of the algorithm using an Instance rather than iterators

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§

Source§

impl<'learn, 'term, ProofW, OInit, BCG> Init for LowerBounding<CaDiCaL<'learn, 'term>, GeneralizedTotalizer, Totalizer, ProofW, OInit, BCG>
where ProofW: Write + 'static, OInit: Initialize<CaDiCaL<'learn, 'term>>, BCG: Fn(Assignment) -> Clause,

Source§

type Oracle = CaDiCaL<'learn, 'term>

Source§

type BlockClauseGen = BCG

Source§

impl<O, PBE, CE, ProofW, OInit, BCG> Init for BiOptSat<O, PBE, CE, ProofW, OInit, BCG>

Source§

impl<O, PBE, CE, ProofW, OInit, BCG> Init for PMinimal<O, PBE, CE, ProofW, OInit, BCG>