pub struct Backend<'a> { /* private fields */ }Expand description
Handle to the backend to add directives in aspif format.
Implementations§
Source§impl<'a> Backend<'a>
impl<'a> Backend<'a>
Sourcepub fn rule(
&mut self,
choice: bool,
head: &[Atom],
body: &[SolverLiteral],
) -> Result<(), ClingoError>
pub fn rule( &mut self, choice: bool, head: &[Atom], body: &[SolverLiteral], ) -> Result<(), ClingoError>
Sourcepub fn weight_rule(
&mut self,
choice: bool,
head: &[Atom],
lower_bound: i32,
body: &[WeightedLiteral],
) -> Result<(), ClingoError>
pub fn weight_rule( &mut self, choice: bool, head: &[Atom], lower_bound: i32, body: &[WeightedLiteral], ) -> Result<(), ClingoError>
Sourcepub fn minimize(
&mut self,
priority: i32,
literals: &[WeightedLiteral],
) -> Result<(), ClingoError>
pub fn minimize( &mut self, priority: i32, literals: &[WeightedLiteral], ) -> Result<(), ClingoError>
Sourcepub fn project(&mut self, atoms: &[Atom]) -> Result<(), ClingoError>
pub fn project(&mut self, atoms: &[Atom]) -> Result<(), ClingoError>
Sourcepub fn external(
&mut self,
atom: Atom,
type_: ExternalType,
) -> Result<(), ClingoError>
pub fn external( &mut self, atom: Atom, type_: ExternalType, ) -> Result<(), ClingoError>
Sourcepub fn assume(&mut self, literals: &[SolverLiteral]) -> Result<(), ClingoError>
pub fn assume(&mut self, literals: &[SolverLiteral]) -> Result<(), ClingoError>
Sourcepub fn heuristic(
&mut self,
atom: Atom,
htype: HeuristicType,
bias: i32,
priority: u32,
condition: &[SolverLiteral],
) -> Result<(), ClingoError>
pub fn heuristic( &mut self, atom: Atom, htype: HeuristicType, bias: i32, priority: u32, condition: &[SolverLiteral], ) -> Result<(), ClingoError>
Sourcepub fn acyc_edge(
&mut self,
node_u: i32,
node_v: i32,
condition: &[SolverLiteral],
) -> Result<(), ClingoError>
pub fn acyc_edge( &mut self, node_u: i32, node_v: i32, condition: &[SolverLiteral], ) -> Result<(), ClingoError>
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Backend<'a>
impl<'a> RefUnwindSafe for Backend<'a>
impl<'a> Send for Backend<'a>
impl<'a> Sync for Backend<'a>
impl<'a> Unpin for Backend<'a>
impl<'a> !UnwindSafe for Backend<'a>
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