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

Class to add clauses to a running search. More...

#include <solve.hh>

Public Member Functions

 SolveControl (clingo_solve_control_t *ctl)
 Constructor from the underlying C representation.
 
auto base () const -> Base
 Get base associated with the solve control.
 
void add_clause (ProgramLiteralSpan lits) const
 Add clause to the running search.
 
void add_nogood (ProgramLiteralSpan lits) const
 Add clause to the running search.
 

Detailed Description

Class to add clauses to a running search.

Constructor & Destructor Documentation

◆ SolveControl()

Clingo::SolveControl::SolveControl ( clingo_solve_control_t ctl)
inlineexplicit

Constructor from the underlying C representation.

Parameters
ctlthe C representation of the solve control object

Member Function Documentation

◆ add_clause()

void Clingo::SolveControl::add_clause ( ProgramLiteralSpan  lits) const
inline

Add clause to the running search.

Parameters
litsthe literals of the clause to add

◆ add_nogood()

void Clingo::SolveControl::add_nogood ( ProgramLiteralSpan  lits) const
inline

Add clause to the running search.

This is equivalent to calling Clingo::SolveControl::add_clause() with the negated literals.

Parameters
litsthe literals of the nogood to add

◆ base()

auto Clingo::SolveControl::base ( ) const -> Base
inline

Get base associated with the solve control.

Returns
the base associated with the solve control

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