Struct clingo::Assignment [] [src]

pub struct Assignment(_);

Represents a (partial) assignment of a particular solver.

An assignment assigns truth values to a set of literals. A literal is assigned to either true or false, or is unassigned. Furthermore, each assigned literal is associated with a decision level. There is exactly one decision literal for each decision level greater than zero. Assignments to all other literals on the same level are consequences implied by the current and possibly previous decisions. Assignments on level zero are immediate consequences of the current program. Decision levels are consecutive numbers starting with zero up to and including the current decision level.

Methods

impl Assignment
[src]

[src]

Get the current decision level.

[src]

Check whether the given assignment is conflicting.

[src]

Check whether the given literal is part of a (partial) assignment.

Arguments

  • literal - the literal

[src]

Determine the decision level of a given literal.

Arguments

  • literal - the literal

Returns the decision level of the given literal

[src]

Determine the decision literal given a decision level.

Arguments

  • level - the level

Returns the decision literal for the given decision level

[src]

Check if a literal has a fixed truth value.

Arguments

  • literal - the literal

Returns whether the literal is fixed

[src]

Check if a literal is true.

Arguments

[src]

Check if a literal has a fixed truth value.

Arguments

  • literal - the literal

Returns whether the literal is false (see Assignment::truth_value())

[src]

Determine the truth value of a given literal.

Arguments

  • literal - the literal
  • value - the resulting truth value

Returns whether the call was successful

[src]

The number of assigned literals in the assignment.

[src]

The maximum size of the assignment (if all literals are assigned).

[src]

Check if the assignmen is total, i.e. - size == max_size.

Trait Implementations

impl Debug for Assignment
[src]

[src]

Formats the value using the given formatter. Read more

impl Copy for Assignment
[src]

impl Clone for Assignment
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Assignment

impl Sync for Assignment