carl  24.04
Computer ARithmetic Library
carl::BasicConstraint< Pol > Class Template Reference

Represent a polynomial (in)equality against zero. More...

#include <BasicConstraint.h>

Collaboration diagram for carl::BasicConstraint< Pol >:

Public Member Functions

 BasicConstraint (bool is_true)
 
 BasicConstraint (const Pol &lhs, const Relation rel)
 
 BasicConstraint (Pol &&lhs, const Relation rel)
 
const Pollhs () const
 
void set_lhs (Pol &&lhs)
 
Relation relation () const
 
void set_relation (Relation rel)
 
size_t hash () const
 
bool is_trivial_true () const
 
bool is_trivial_false () const
 
unsigned is_consistent () const
 
BasicConstraint< Polnegation () const
 

Private Attributes

Pol m_lhs
 The polynomial which is compared by this constraint to zero. More...
 
Relation m_relation
 The relation symbol comparing the polynomial considered by this constraint to zero. More...
 
std::size_t m_hash
 Cache for the hash. More...
 

Detailed Description

template<typename Pol>
class carl::BasicConstraint< Pol >

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 15 of file BasicConstraint.h.

Constructor & Destructor Documentation

◆ BasicConstraint() [1/3]

template<typename Pol >
carl::BasicConstraint< Pol >::BasicConstraint ( bool  is_true)
inline

Definition at line 24 of file BasicConstraint.h.

◆ BasicConstraint() [2/3]

template<typename Pol >
carl::BasicConstraint< Pol >::BasicConstraint ( const Pol lhs,
const Relation  rel 
)
inline

Definition at line 26 of file BasicConstraint.h.

◆ BasicConstraint() [3/3]

template<typename Pol >
carl::BasicConstraint< Pol >::BasicConstraint ( Pol &&  lhs,
const Relation  rel 
)
inline

Definition at line 28 of file BasicConstraint.h.

Member Function Documentation

◆ hash()

template<typename Pol >
size_t carl::BasicConstraint< Pol >::hash ( ) const
inline
Returns
A hash value for this constraint.

Definition at line 63 of file BasicConstraint.h.

Here is the caller graph for this function:

◆ is_consistent()

template<typename Pol >
unsigned carl::BasicConstraint< Pol >::is_consistent ( ) const
inline

Definition at line 95 of file BasicConstraint.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_trivial_false()

template<typename Pol >
bool carl::BasicConstraint< Pol >::is_trivial_false ( ) const
inline

Definition at line 81 of file BasicConstraint.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_trivial_true()

template<typename Pol >
bool carl::BasicConstraint< Pol >::is_trivial_true ( ) const
inline

Definition at line 67 of file BasicConstraint.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lhs()

template<typename Pol >
const Pol& carl::BasicConstraint< Pol >::lhs ( ) const
inline
Returns
The considered polynomial being the left-hand side of this constraint. Hence, the right-hand side of any constraint is always 0.

Definition at line 33 of file BasicConstraint.h.

Here is the caller graph for this function:

◆ negation()

template<typename Pol >
BasicConstraint<Pol> carl::BasicConstraint< Pol >::negation ( ) const
inline

Definition at line 101 of file BasicConstraint.h.

Here is the call graph for this function:

◆ relation()

template<typename Pol >
Relation carl::BasicConstraint< Pol >::relation ( ) const
inline
Returns
The relation symbol of this constraint.

Definition at line 48 of file BasicConstraint.h.

Here is the caller graph for this function:

◆ set_lhs()

template<typename Pol >
void carl::BasicConstraint< Pol >::set_lhs ( Pol &&  lhs)
inline
Returns
The considered polynomial being the left-hand side of this constraint. Hence, the right-hand side of any constraint is always 0.

Definition at line 40 of file BasicConstraint.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_relation()

template<typename Pol >
void carl::BasicConstraint< Pol >::set_relation ( Relation  rel)
inline
Returns
The relation symbol of this constraint.

Definition at line 55 of file BasicConstraint.h.

Here is the caller graph for this function:

Field Documentation

◆ m_hash

template<typename Pol >
std::size_t carl::BasicConstraint< Pol >::m_hash
private

Cache for the hash.

Definition at line 21 of file BasicConstraint.h.

◆ m_lhs

template<typename Pol >
Pol carl::BasicConstraint< Pol >::m_lhs
private

The polynomial which is compared by this constraint to zero.

Definition at line 17 of file BasicConstraint.h.

◆ m_relation

template<typename Pol >
Relation carl::BasicConstraint< Pol >::m_relation
private

The relation symbol comparing the polynomial considered by this constraint to zero.

Definition at line 19 of file BasicConstraint.h.


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