Universe::IUniversePseudoBooleanSolver class

The IUniversePseudoBooleanSolver interface defines the contract for pseudo-Boolean solvers.

Base classes

class IUniverseSatSolver virtual

Derived classes

class IUniverseCspSolver virtual
class UniverseJavaPseudoBooleanSolver virtual

Constructors, destructors, conversion operators

~IUniversePseudoBooleanSolver() defaulted override

Public functions

void addPseudoBoolean(const std::vector<int>& literals, const std::vector<Universe::BigInteger>& coefficients, bool moreThan, const BigInteger& degree) pure virtual
void addAtMost(const std::vector<int>& literals, int degree) pure virtual
void addAtMost(const std::vector<int>& literals, const std::vector<int>& coefficients, int degree) pure virtual
void addAtMost(const std::vector<int>& literals, const std::vector<Universe::BigInteger>& coefficients, const Universe::BigInteger& degree) pure virtual
void addAtLeast(const std::vector<int>& literals, int degree) pure virtual
void addAtLeast(const std::vector<int>& literals, const std::vector<int>& coefficients, int degree) pure virtual
void addAtLeast(const std::vector<int>& literals, const std::vector<Universe::BigInteger>& coefficients, const Universe::BigInteger& degree) pure virtual
void addExactly(const std::vector<int>& literals, int degree) pure virtual
void addExactly(const std::vector<int>& literals, const std::vector<int>& coefficients, int degree) pure virtual
void addExactly(const std::vector<int>& literals, const std::vector<Universe::BigInteger>& coefficients, const Universe::BigInteger& degree) pure virtual

Function documentation

Universe::IUniversePseudoBooleanSolver::~IUniversePseudoBooleanSolver() override defaulted

Destroys this IUniversePseudoBooleanSolver.

void Universe::IUniversePseudoBooleanSolver::addPseudoBoolean(const std::vector<int>& literals, const std::vector<Universe::BigInteger>& coefficients, bool moreThan, const BigInteger& degree) pure virtual

Parameters
literals The literals of the constraint to add.
coefficients The coefficients of the literals.
moreThan Whether the constraint is an at-least constraint, or an at-most constraint.
degree The degree of the constraint.
Exceptions
UniverseContradictionException If the constraint to add is inconsistent.

Creates a pseudo-Boolean constraint of type at-least or at-most.

void Universe::IUniversePseudoBooleanSolver::addAtMost(const std::vector<int>& literals, int degree) pure virtual

Parameters
literals The literals of the constraint to add.
degree The degree of the constraint.
Exceptions
UniverseContradictionException If the constraint to add is inconsistent.

Creates an at-most cardinality constraint.

void Universe::IUniversePseudoBooleanSolver::addAtMost(const std::vector<int>& literals, const std::vector<int>& coefficients, int degree) pure virtual

Parameters
literals The literals of the constraint to add.
coefficients The coefficients of the literals.
degree The degree of the constraint.
Exceptions
UniverseContradictionException If the constraint to add is inconsistent.

Creates an at-most pseudo-Boolean constraint.

void Universe::IUniversePseudoBooleanSolver::addAtMost(const std::vector<int>& literals, const std::vector<Universe::BigInteger>& coefficients, const Universe::BigInteger& degree) pure virtual

Parameters
literals The literals of the constraint to add.
coefficients The coefficients of the literals.
degree The degree of the constraint.
Exceptions
UniverseContradictionException If the constraint to add is inconsistent.

Creates an at-most pseudo-Boolean constraint.

void Universe::IUniversePseudoBooleanSolver::addAtLeast(const std::vector<int>& literals, int degree) pure virtual

Parameters
literals The literals of the constraint to add.
degree The degree of the constraint.
Exceptions
UniverseContradictionException If the constraint to add is inconsistent.

Creates an at-least cardinality constraint.

void Universe::IUniversePseudoBooleanSolver::addAtLeast(const std::vector<int>& literals, const std::vector<int>& coefficients, int degree) pure virtual

Parameters
literals The literals of the constraint to add.
coefficients The coefficients of the literals.
degree The degree of the constraint.
Exceptions
UniverseContradictionException If the constraint to add is inconsistent.

Creates an at-least pseudo-Boolean constraint.

void Universe::IUniversePseudoBooleanSolver::addAtLeast(const std::vector<int>& literals, const std::vector<Universe::BigInteger>& coefficients, const Universe::BigInteger& degree) pure virtual

Parameters
literals The literals of the constraint to add.
coefficients The coefficients of the literals.
degree The degree of the constraint.
Exceptions
UniverseContradictionException If the constraint to add is inconsistent.

Creates an at-least pseudo-Boolean constraint.

void Universe::IUniversePseudoBooleanSolver::addExactly(const std::vector<int>& literals, int degree) pure virtual

Parameters
literals The literals of the constraint to add.
degree The degree of the constraint.
Exceptions
UniverseContradictionException If the constraint to add is inconsistent.

Creates an exactly cardinality constraint.

void Universe::IUniversePseudoBooleanSolver::addExactly(const std::vector<int>& literals, const std::vector<int>& coefficients, int degree) pure virtual

Parameters
literals The literals of the constraint to add.
coefficients The coefficients of the literals.
degree The degree of the constraint.
Exceptions
UniverseContradictionException If the constraint to add is inconsistent.

Creates an exactly pseudo-Boolean constraint.

void Universe::IUniversePseudoBooleanSolver::addExactly(const std::vector<int>& literals, const std::vector<Universe::BigInteger>& coefficients, const Universe::BigInteger& degree) pure virtual

Parameters
literals The literals of the constraint to add.
coefficients The coefficients of the literals.
degree The degree of the constraint.
Exceptions
UniverseContradictionException If the constraint to add is inconsistent.

Creates an exactly pseudo-Boolean constraint.