pub struct LowerBounding<O, PBE = GeneralizedTotalizer, CE = Totalizer, ProofW = BufWriter<File>, OInit = DefaultInitializer, BCG = fn(Assignment) -> Clause>where
ProofW: Write,{ /* private fields */ }
Expand description
The lower-bounding algorithm type
§Generics
O
: the SAT solver oraclePBE
: pseudo-Boolean objective encodingCE
: cardinality objective encodingProofW
: the proof writerOInit
: the oracle initializerBCG
: the blocking clause generator
Trait Implementations§
Source§impl<'learn, 'term, PBE, CE, ProofW, OInit, BCG> CoreBoost for LowerBounding<CaDiCaL<'learn, 'term>, PBE, CE, ProofW, OInit, BCG>where
ProofW: Write + 'static,
(PBE, CE): MergeOllRef<PBE = PBE, CE = CE>,
OInit: Initialize<CaDiCaL<'learn, 'term>>,
impl<'learn, 'term, PBE, CE, ProofW, OInit, BCG> CoreBoost for LowerBounding<CaDiCaL<'learn, 'term>, PBE, CE, ProofW, OInit, BCG>where
ProofW: Write + 'static,
(PBE, CE): MergeOllRef<PBE = PBE, CE = CE>,
OInit: Initialize<CaDiCaL<'learn, 'term>>,
Source§fn core_boost(
&mut self,
opts: CoreBoostingOptions,
) -> MaybeTerminatedError<bool>
fn core_boost( &mut self, opts: CoreBoostingOptions, ) -> MaybeTerminatedError<bool>
Performs core boosting. Returns false if instance is unsat.
Source§impl<O, PBE, CE, ProofW, OInit, BCG> ExtendedSolveStats for LowerBounding<O, PBE, CE, ProofW, OInit, BCG>
impl<O, PBE, CE, ProofW, OInit, BCG> ExtendedSolveStats for LowerBounding<O, PBE, CE, ProofW, OInit, BCG>
Source§fn oracle_stats(&self) -> SolverStats
fn oracle_stats(&self) -> SolverStats
Gets statistics from the internal oracle
Source§fn encoding_stats(&self) -> Vec<EncodingStats>
fn encoding_stats(&self) -> Vec<EncodingStats>
Gets statistics from the objective encodings
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,
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§fn new<Cls>(
clauses: Cls,
objs: Vec<Objective>,
var_manager: VarManager,
opts: KernelOptions,
block_clause_gen: BCG,
) -> Result<Self>where
Cls: IntoIterator<Item = Clause>,
fn new<Cls>(
clauses: Cls,
objs: Vec<Objective>,
var_manager: VarManager,
opts: KernelOptions,
block_clause_gen: BCG,
) -> Result<Self>where
Cls: IntoIterator<Item = Clause>,
Initializes a default solver with a configured oracle and options. The oracle should not have any clauses loaded yet.
type Oracle = CaDiCaL<'learn, 'term>
type BlockClauseGen = BCG
Source§fn 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 iteratorsSource§impl<'term, 'learn, ProofW, OInit, BCG> InitCert for LowerBounding<CaDiCaL<'term, 'learn>, GeneralizedTotalizer, Totalizer, ProofW, OInit, BCG>where
OInit: Initialize<CaDiCaL<'term, 'learn>>,
ProofW: Write + 'static,
BCG: Fn(Assignment) -> Clause,
impl<'term, 'learn, ProofW, OInit, BCG> InitCert for LowerBounding<CaDiCaL<'term, 'learn>, GeneralizedTotalizer, Totalizer, ProofW, OInit, BCG>where
OInit: Initialize<CaDiCaL<'term, 'learn>>,
ProofW: Write + 'static,
BCG: Fn(Assignment) -> Clause,
Source§fn new_cert<Cls>(
clauses: Cls,
objs: Vec<Objective>,
var_manager: VarManager,
opts: KernelOptions,
proof: Proof<Self::ProofWriter>,
block_clause_gen: BCG,
) -> Result<Self>
fn new_cert<Cls>( clauses: Cls, objs: Vec<Objective>, var_manager: VarManager, opts: KernelOptions, proof: Proof<Self::ProofWriter>, block_clause_gen: BCG, ) -> Result<Self>
Initializes a default solver with a configured oracle and options. The oracle should not have any clauses loaded yet.
type ProofWriter = ProofW
Source§fn from_instance_cert(
inst: Instance,
opts: KernelOptions,
proof: Proof<Self::ProofWriter>,
block_clause_gen: <Self as Init>::BlockClauseGen,
) -> Result<Self>
fn from_instance_cert( inst: Instance, opts: KernelOptions, proof: Proof<Self::ProofWriter>, block_clause_gen: <Self as Init>::BlockClauseGen, ) -> Result<Self>
Initialization of the algorithm using an
Instance
rather than iteratorsSource§impl<O, PBE, CE, ProofW, OInit, BCG> KernelFunctions for LowerBounding<O, PBE, CE, ProofW, OInit, BCG>
impl<O, PBE, CE, ProofW, OInit, BCG> KernelFunctions for LowerBounding<O, PBE, CE, ProofW, OInit, BCG>
Source§fn pareto_front(&self) -> ParetoFront
fn pareto_front(&self) -> ParetoFront
Gets the Pareto front discovered so far
Source§fn attach_logger<L: WriteSolverLog + 'static>(&mut self, logger: L)
fn attach_logger<L: WriteSolverLog + 'static>(&mut self, logger: L)
Attaches a logger to the solver
Source§fn detach_logger(&mut self) -> Option<Box<dyn WriteSolverLog>>
fn detach_logger(&mut self) -> Option<Box<dyn WriteSolverLog>>
Detaches a logger from the solver
Source§fn interrupter(&mut self) -> Interrupter
fn interrupter(&mut self) -> Interrupter
Gets an iterrupter to the solver
Source§impl<'learn, 'term, ProofW, OInit, BCG> Solve for LowerBounding<CaDiCaL<'term, 'learn>, GeneralizedTotalizer, Totalizer, ProofW, OInit, BCG>
impl<'learn, 'term, ProofW, OInit, BCG> Solve for LowerBounding<CaDiCaL<'term, 'learn>, GeneralizedTotalizer, Totalizer, ProofW, OInit, BCG>
Source§fn solve(&mut self, limits: Limits) -> MaybeTerminatedError
fn solve(&mut self, limits: Limits) -> MaybeTerminatedError
Solves the instance under given limits. If not fully solved, returns an
early termination reason.
Source§fn all_stats(&self) -> (Stats, Option<SolverStats>, Option<Vec<EncodingStats>>)
fn all_stats(&self) -> (Stats, Option<SolverStats>, Option<Vec<EncodingStats>>)
Gets all statistics from the solver
Auto Trait Implementations§
impl<O, PBE, CE, ProofW, OInit, BCG> Freeze for LowerBounding<O, PBE, CE, ProofW, OInit, BCG>
impl<O, PBE = GeneralizedTotalizer, CE = Totalizer, ProofW = BufWriter<File>, OInit = DefaultInitializer, BCG = fn(Assignment) -> Clause> !RefUnwindSafe for LowerBounding<O, PBE, CE, ProofW, OInit, BCG>
impl<O, PBE = GeneralizedTotalizer, CE = Totalizer, ProofW = BufWriter<File>, OInit = DefaultInitializer, BCG = fn(Assignment) -> Clause> !Send for LowerBounding<O, PBE, CE, ProofW, OInit, BCG>
impl<O, PBE = GeneralizedTotalizer, CE = Totalizer, ProofW = BufWriter<File>, OInit = DefaultInitializer, BCG = fn(Assignment) -> Clause> !Sync for LowerBounding<O, PBE, CE, ProofW, OInit, BCG>
impl<O, PBE, CE, ProofW, OInit, BCG> Unpin for LowerBounding<O, PBE, CE, ProofW, OInit, BCG>
impl<O, PBE = GeneralizedTotalizer, CE = Totalizer, ProofW = BufWriter<File>, OInit = DefaultInitializer, BCG = fn(Assignment) -> Clause> !UnwindSafe for LowerBounding<O, PBE, CE, ProofW, OInit, BCG>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<Alg> InitCertDefaultBlock for Alg
impl<Alg> InitCertDefaultBlock for Alg
Source§fn new_default_blocking_cert<Cls>(
clauses: Cls,
objs: Vec<Objective>,
var_manager: VarManager,
opts: KernelOptions,
proof: Proof<Self::ProofWriter>,
) -> Result<Self>
fn new_default_blocking_cert<Cls>( clauses: Cls, objs: Vec<Objective>, var_manager: VarManager, opts: KernelOptions, proof: Proof<Self::ProofWriter>, ) -> Result<Self>
Initializes the algorithm with the default blocking clause generator
Source§fn from_instance_default_blocking_cert(
inst: Instance,
opts: KernelOptions,
proof: Proof<Self::ProofWriter>,
) -> Result<Self>
fn from_instance_default_blocking_cert( inst: Instance, opts: KernelOptions, proof: Proof<Self::ProofWriter>, ) -> Result<Self>
Initializes the algorithm using an
Instance
rather than iterators with the default
blocking clause generatorSource§impl<Alg> InitDefaultBlock for Alg
impl<Alg> InitDefaultBlock for Alg
Source§fn new_default_blocking<Cls>(
clauses: Cls,
objs: Vec<Objective>,
var_manager: VarManager,
opts: KernelOptions,
) -> Result<Self>where
Cls: IntoIterator<Item = Clause>,
fn new_default_blocking<Cls>(
clauses: Cls,
objs: Vec<Objective>,
var_manager: VarManager,
opts: KernelOptions,
) -> Result<Self>where
Cls: IntoIterator<Item = Clause>,
Initializes the algorithm with the default blocking clause generator
Source§fn from_instance_default_blocking(
inst: Instance,
opts: KernelOptions,
) -> Result<Self>
fn from_instance_default_blocking( inst: Instance, opts: KernelOptions, ) -> Result<Self>
Initializes the algorithm using an
Instance
rather than iterators with the default
blocking clause generatorSource§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more