Struct clingo::PropagateControl [] [src]

pub struct PropagateControl(_);

This object can be used to add clauses and propagate literals while solving.

Methods

impl PropagateControl
[src]

[src]

Get the id of the underlying solver thread.

Thread ids are consecutive numbers starting with zero.

[src]

Get the assignment associated with the underlying solver.

[src]

Get the assignment associated with the underlying solver.

[src]

Adds a new volatile literal to the underlying solver thread.

Attention: The literal is only valid within the current solving step and solver thread. All volatile literals and clauses involving a volatile literal are deleted after the current search.

Arguments

  • result - the (positive) solver literal

Errors:

[src]

Add a watch for the solver literal in the given phase.

Note: Unlike PropagateInit::add_watch() this does not add a watch to all solver threads but just the current one.

Arguments

  • literal - the literal to watch

Errors:

See: PropagateControl::remove_watch()

[src]

Check whether a literal is watched in the current solver thread.

Arguments

  • literal - the literal to check

[src]

Removes the watch (if any) for the given solver literal.

Note: Similar to PropagateInit::add_watch() this just removes the watch in the current solver thread.

Arguments

  • literal - the literal to remove

[src]

Add the given clause to the solver.

This method sets its result to false if the current propagation must be stopped for the solver to backtrack.

Attention: No further calls on the control object or functions on the assignment should be called when the result of this method is false.

Arguments

  • clause - the clause to add
  • ctype - the clause type determining its lifetime

Errors

[src]

Propagate implied literals (resulting from added clauses).

This method sets its result to false if the current propagation must be stopped for the solver to backtrack.

Attention: No further calls on the control object or functions on the assignment should be called when the result of this method is false.

Returns result indicating whether propagation has to be stopped

Errors

Trait Implementations

impl Debug for PropagateControl
[src]

[src]

Formats the value using the given formatter. Read more

impl Copy for PropagateControl
[src]

impl Clone for PropagateControl
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations