Clingo
Loading...
Searching...
No Matches
Clingo::Observer Class Reference

Observer interface to inspect the current ground program. More...

#include <observe.hh>

Public Member Functions

 Observer ()=default
 The default constructor.
 
 Observer (Observer &&other)=delete
 Disable move and copy operations.
 
virtual ~Observer ()=default
 The default destructor.
 
void init_program (bool incremental)
 Callback for the beginning of the program.
 
void begin_step ()
 Callback for the beginning of a step.
 
void end_step (Base base)
 Callback for the end of a step.
 
void rule (ProgramAtomSpan head, ProgramLiteralSpan body, bool choice)
 Callback for a rule.
 
void weight_rule (ProgramAtomSpan head, Weight lower, WeightedLiteralSpan body, bool choice)
 Callback for a weight rule.
 
void minimize (WeightedLiteralSpan literals, Weight priority)
 Callback for a minimize constraint.
 
void project (ProgramAtomSpan atoms)
 Callback for a projection directive.
 
void external (ProgramAtom atom, ExternalType type)
 Callback for an external statement.
 
void assume (ProgramLiteralSpan literals)
 Callback for an assumption directive.
 
void heuristic (ProgramAtom atom, HeuristicType type, int bias, unsigned priority, ProgramLiteralSpan condition)
 
void edge (int node_u, int node_v, ProgramLiteralSpan condition)
 Callback for an edge statement.
 

Friends

class Control
 

Detailed Description

Observer interface to inspect the current ground program.

Member Function Documentation

◆ assume()

void Clingo::Observer::assume ( ProgramLiteralSpan  literals)
inline

Callback for an assumption directive.

Parameters
literalsthe literals to assume

◆ edge()

void Clingo::Observer::edge ( int  node_u,
int  node_v,
ProgramLiteralSpan  condition 
)
inline

Callback for an edge statement.

Parameters
node_uthe first node of the edge
node_vthe second node of the edge
conditionthe condition under which the edge is active

◆ external()

void Clingo::Observer::external ( ProgramAtom  atom,
ExternalType  type 
)
inline

Callback for an external statement.

Parameters
atomthe external atom
typethe type of the external statement

◆ heuristic()

void Clingo::Observer::heuristic ( ProgramAtom  atom,
HeuristicType  type,
int  bias,
unsigned  priority,
ProgramLiteralSpan  condition 
)
inline
Parameters
atomthe atom to apply the heuristic to
typethe type of the heuristic modification
biasthe bias of the heuristic modification
prioritythe priority of the heuristic modification
conditionthe condition when to apply the heuristic modification

◆ init_program()

void Clingo::Observer::init_program ( bool  incremental)
inline

Callback for the beginning of the program.

Parameters
incrementalwhether the program is incremental

◆ minimize()

void Clingo::Observer::minimize ( WeightedLiteralSpan  literals,
Weight  priority 
)
inline

Callback for a minimize constraint.

Parameters
literalsthe weighted literals to minimize
prioritythe priority of the minimize constraint

◆ project()

void Clingo::Observer::project ( ProgramAtomSpan  atoms)
inline

Callback for a projection directive.

Parameters
atomsthe atoms to project on

◆ rule()

void Clingo::Observer::rule ( ProgramAtomSpan  head,
ProgramLiteralSpan  body,
bool  choice 
)
inline

Callback for a rule.

Parameters
headthe head of the rule
bodythe body of the rule
choicewhether the head is a choice or a disjunction

◆ weight_rule()

void Clingo::Observer::weight_rule ( ProgramAtomSpan  head,
Weight  lower,
WeightedLiteralSpan  body,
bool  choice 
)
inline

Callback for a weight rule.

Parameters
headthe head of the weight rule
lowerthe lower bound of the weight rule
bodythe weighted body of the weight rule
choicewhether the head is a choice or a disjunction

The documentation for this class was generated from the following file: