clingo
|
A rule of a logic program. More...
#include <logic_program_types.h>
Public Member Functions | |
Rule (RuleType t=ENDRULE) | |
void | clear () |
Resets the rule. More... | |
void | swap (Rule &o) |
Swaps *this with o. More... | |
Rule & | setType (RuleType t) |
Sets the type of the rule. More... | |
RuleType | type () const |
Returns the rule's type. More... | |
Rule & | setBound (weight_t bound) |
Sets the lower bound of the rule. More... | |
weight_t | bound () const |
Returns the lower bound of the rule. More... | |
bool | bodyHasWeights () const |
bool | bodyHasBound () const |
bool | bodyIsSet () const |
Rule & | addHead (Var v) |
Adds v as a head of this rule. More... | |
Rule & | addToBody (Var v, bool pos, weight_t w=1) |
Adds v to the positive/negative body of the rule. More... | |
Public Attributes | |
VarVec | heads |
WeightLitVec | body |
A rule of a logic program.
Objects of this class represent one rule of a logic program.
Adds v to the positive/negative body of the rule.
|
inline |
|
inline |
|
inline |
|
inline |
Returns the lower bound of the rule.
void Clasp::Asp::Rule::clear | ( | ) |
Resets the rule.
Sets the lower bound of the rule.
Sets the type of the rule.
|
inline |
Swaps *this with o.
|
inline |
Returns the rule's type.
WeightLitVec Clasp::Asp::Rule::body |
Body literals of this rule.
VarVec Clasp::Asp::Rule::heads |
List of rule heads.