Struct clingo::PropagateInit
[−]
[src]
pub struct PropagateInit(_);
Object to initialize a user-defined propagator before each solving step.
Each symbolic or theory atom is uniquely associated with an aspif atom in form of a positive integer (Literal
).
Aspif literals additionally are signed to represent default negation.
Furthermore, there are non-zero integer solver literals (also represented using Literal
.
There is a surjective mapping from program atoms to solver literals.
All methods called during propagation use solver literals whereas SymbolicAtoms::literal()
and TheoryAtoms::atom_literal()
return program literals.
The function PropagateInit::solver_literal()
can be used to map program literals or condition ids to solver literals.
Methods
impl PropagateInit
[src]
pub fn solver_literal(&self, Literal: Literal) -> Option<Literal>
[src]
Map the given program literal or condition id to its solver literal.
Arguments
aspif_literal
- the aspif literal to map
Returns the corresponding solver literal
pub fn add_watch(&mut self, Literal: Literal) -> Option<()>
[src]
Add a watch for the solver literal in the given phase.
Arguments
solver_literal
- the solver literal
pub fn symbolic_atoms(&self) -> Option<&SymbolicAtoms>
[src]
Get an object to inspect the symbolic atoms.
pub fn theory_atoms(&self) -> Option<&TheoryAtoms>
[src]
Get an object to inspect the theory atoms.
pub fn number_of_threads(&self) -> usize
[src]
Get the number of threads used in subsequent solving.
pub fn set_check_mode(&mut self, mode: PropagatorCheckMode)
[src]
Configure when to call the check method of the propagator.
Arguments
mode
- bitmask when to call the propagator
See: Propagator::check()
pub fn get_check_mode(&self) -> PropagatorCheckMode
[src]
Get the current check mode of the propagator.
Returns bitmask when to call the propagator
Trait Implementations
impl Debug for PropagateInit
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Copy for PropagateInit
[src]
impl Clone for PropagateInit
[src]
fn clone(&self) -> PropagateInit
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more