carl
24.04
Computer ARithmetic Library
|
Represent a polynomial (in)equality against zero. More...
#include <Constraint.h>
Public Member Functions | |
Constraint (bool valid=true) | |
Constraint (carl::Variable::Arg var, Relation rel, const typename Pol::NumberType &bound=constant_zero< typename Pol::NumberType >::get()) | |
Constraint (const Pol &lhs, Relation rel) | |
Constraint (const BasicConstraint< Pol > &constraint) | |
Constraint (const Constraint &constraint) | |
Constraint (Constraint &&constraint) noexcept | |
Constraint & | operator= (const Constraint &constraint) |
Constraint & | operator= (Constraint &&constraint) noexcept |
operator const BasicConstraint< Pol > & () const | |
operator BasicConstraint< Pol > () const | |
const BasicConstraint< Pol > & | constr () const |
Returns the associated BasicConstraint. More... | |
const Pol & | lhs () const |
Relation | relation () const |
size_t | hash () const |
const auto & | variables () const |
const Factors< Pol > & | lhs_factorization () const |
template<bool gatherCoeff = false> | |
const VarInfo< Pol > & | var_info (const Variable variable) const |
template<bool gatherCoeff = false> | |
const VarsInfo< Pol > & | var_info () const |
unsigned | is_consistent () const |
Checks, whether the constraint is consistent. More... | |
Constraint | negation () const |
uint | maxDegree (const Variable &_variable) const |
uint | max_degree () const |
Pol | coefficient (const Variable &_var, uint _degree) const |
Calculates the coefficient of the given variable with the given degree. More... | |
bool | integer_valued () const |
bool | realValued () const |
bool | hasIntegerValuedVariable () const |
Checks if this constraints contains an integer valued variable. More... | |
bool | hasRealValuedVariable () const |
Checks if this constraints contains an real valued variable. More... | |
bool | isPseudoBoolean () const |
Determines whether the constraint is pseudo-boolean. More... | |
Private Attributes | |
pool::PoolElement< CachedConstraintContent< Pol > > | m_element |
Friends | |
template<typename P > | |
bool | operator== (const Constraint< P > &lhs, const Constraint< P > &rhs) |
template<typename P > | |
bool | operator< (const Constraint< P > &lhs, const Constraint< P > &rhs) |
template<typename P > | |
std::ostream & | operator<< (std::ostream &os, const Constraint< P > &c) |
Represent a polynomial (in)equality against zero.
Such an (in)equality can be seen as an atomic formula/atom for the theory of real arithmetic.
Definition at line 62 of file Constraint.h.
|
inlineexplicit |
|
inlineexplicit |
Definition at line 70 of file Constraint.h.
|
inlineexplicit |
Definition at line 72 of file Constraint.h.
|
inlineexplicit |
Definition at line 74 of file Constraint.h.
|
inline |
Definition at line 76 of file Constraint.h.
|
inlinenoexcept |
Definition at line 78 of file Constraint.h.
|
inline |
Calculates the coefficient of the given variable with the given degree.
Note, that it only computes the coefficient once and stores the result.
_var | The variable for which to calculate the coefficient. |
_degree | The according degree of the variable for which to calculate the coefficient. |
Definition at line 232 of file Constraint.h.
|
inline |
Returns the associated BasicConstraint.
Definition at line 101 of file Constraint.h.
|
inline |
Definition at line 123 of file Constraint.h.
|
inline |
Checks if this constraints contains an integer valued variable.
Definition at line 257 of file Constraint.h.
|
inline |
Checks if this constraints contains an real valued variable.
Definition at line 266 of file Constraint.h.
|
inline |
Definition at line 241 of file Constraint.h.
|
inline |
Checks, whether the constraint is consistent.
It differs between, containing variables, consistent, and inconsistent.
Definition at line 194 of file Constraint.h.
|
inline |
Determines whether the constraint is pseudo-boolean.
Definition at line 275 of file Constraint.h.
|
inline |
Definition at line 109 of file Constraint.h.
|
inline |
Definition at line 143 of file Constraint.h.
|
inline |
Definition at line 216 of file Constraint.h.
|
inline |
_variable | The variable for which to determine the maximal degree. |
Definition at line 208 of file Constraint.h.
|
inline |
Definition at line 198 of file Constraint.h.
|
inline |
Definition at line 94 of file Constraint.h.
|
inline |
Definition at line 90 of file Constraint.h.
|
inline |
Definition at line 80 of file Constraint.h.
|
inlinenoexcept |
Definition at line 85 of file Constraint.h.
|
inline |
Definition at line 248 of file Constraint.h.
|
inline |
Definition at line 116 of file Constraint.h.
|
inline |
Definition at line 180 of file Constraint.h.
|
inline |
variable | The variable to find variable information for. |
gatherCoeff |
Definition at line 165 of file Constraint.h.
|
inline |
Definition at line 130 of file Constraint.h.
|
friend |
Definition at line 298 of file Constraint.h.
|
friend |
|
friend |
Definition at line 288 of file Constraint.h.
|
private |
Definition at line 65 of file Constraint.h.