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§
type Oracle: SolveIncremental
type BlockClauseGen: Fn(Assignment) -> Clause
Required Methods§
Sourcefn new<Cls>(
clauses: Cls,
objs: Vec<Objective>,
var_manager: VarManager,
opts: KernelOptions,
block_clause_gen: Self::BlockClauseGen,
) -> Result<Self>where
Cls: IntoIterator<Item = Clause>,
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§
Sourcefn from_instance(
inst: Instance,
opts: KernelOptions,
block_clause_gen: Self::BlockClauseGen,
) -> Result<Self>
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.