ct_common
1.0.1
Common library for combinatorial testing
|
#include <constraint_a_binary.h>
Public Member Functions | |
Constraint_A_Binary (void) | |
Constraint_A_Binary (const Constraint_A_Binary &from) | |
Constraint_A_Binary & | operator= (const Constraint_A_Binary &right) |
virtual | ~Constraint_A_Binary (void) |
virtual std::string | get_class_name (void) const |
virtual void | dump (std::ostream &os, const std::vector< boost::shared_ptr< ParamSpec > > ¶m_specs) const |
virtual std::string | get_op_token (void) const =0 |
boost::shared_ptr< const Exp_A > | get_loprd (void) const |
boost::shared_ptr< const Exp_A > | get_roprd (void) const |
void | set_loprd (const boost::shared_ptr< TreeNode > &loprd) |
void | set_roprd (const boost::shared_ptr< TreeNode > &roprd) |
void | set_precision (double precision) |
double | get_precision (void) const |
virtual EvalType_Bool | Evaluate (const std::vector< boost::shared_ptr< ParamSpec > > ¶m_specs, const Assignment &assignment) const |
Static Public Member Functions | |
static std::string | class_name (void) |
Protected Attributes | |
double | precision_ |
Base class for binary arithmetic constraints
Definition at line 26 of file constraint_a_binary.h.
Definition at line 18 of file constraint_a_binary.cpp.
Constraint_A_Binary::Constraint_A_Binary | ( | const Constraint_A_Binary & | from | ) |
Definition at line 23 of file constraint_a_binary.cpp.
Constraint_A_Binary::~Constraint_A_Binary | ( | void | ) | [virtual] |
Definition at line 34 of file constraint_a_binary.cpp.
std::string Constraint_A_Binary::class_name | ( | void | ) | [static] |
TODO: replace by typeid
Reimplemented from ct::common::Constraint_A.
Reimplemented in ct::common::Constraint_A_EQ, ct::common::Constraint_A_GE, ct::common::Constraint_A_GT, ct::common::Constraint_A_LE, ct::common::Constraint_A_LT, and ct::common::Constraint_A_NE.
Definition at line 41 of file constraint_a_binary.cpp.
void Constraint_A_Binary::dump | ( | std::ostream & | os, |
const std::vector< boost::shared_ptr< ParamSpec > > & | param_specs | ||
) | const [virtual] |
Print the tree node to a given output stream
Implements ct::common::TreeNode.
Definition at line 67 of file constraint_a_binary.cpp.
EvalType_Bool Constraint_A_Binary::Evaluate | ( | const std::vector< boost::shared_ptr< ParamSpec > > & | param_specs, |
const Assignment & | assignment | ||
) | const [virtual] |
Whether the constraint is satisfied
Implements ct::common::Constraint.
Definition at line 45 of file constraint_a_binary.cpp.
std::string Constraint_A_Binary::get_class_name | ( | void | ) | const [virtual] |
TODO: replace by typeid
Reimplemented from ct::common::Constraint_A.
Reimplemented in ct::common::Constraint_A_EQ, ct::common::Constraint_A_GE, ct::common::Constraint_A_GT, ct::common::Constraint_A_LE, ct::common::Constraint_A_LT, and ct::common::Constraint_A_NE.
Definition at line 37 of file constraint_a_binary.cpp.
boost::shared_ptr<const Exp_A> ct::common::Constraint_A_Binary::get_loprd | ( | void | ) | const [inline] |
Definition at line 39 of file constraint_a_binary.h.
virtual std::string ct::common::Constraint_A_Binary::get_op_token | ( | void | ) | const [pure virtual] |
get the string token of the current constraint type
Implemented in ct::common::Constraint_A_EQ, ct::common::Constraint_A_GE, ct::common::Constraint_A_GT, ct::common::Constraint_A_LE, ct::common::Constraint_A_LT, and ct::common::Constraint_A_NE.
double ct::common::Constraint_A_Binary::get_precision | ( | void | ) | const [inline] |
Get the floating-point precision
Definition at line 48 of file constraint_a_binary.h.
boost::shared_ptr<const Exp_A> ct::common::Constraint_A_Binary::get_roprd | ( | void | ) | const [inline] |
Definition at line 40 of file constraint_a_binary.h.
Constraint_A_Binary & Constraint_A_Binary::operator= | ( | const Constraint_A_Binary & | right | ) |
Definition at line 27 of file constraint_a_binary.cpp.
void ct::common::Constraint_A_Binary::set_loprd | ( | const boost::shared_ptr< TreeNode > & | loprd | ) | [inline] |
Definition at line 42 of file constraint_a_binary.h.
void ct::common::Constraint_A_Binary::set_precision | ( | double | precision | ) | [inline] |
Set the floating-point precision (for comparison)
Definition at line 46 of file constraint_a_binary.h.
void ct::common::Constraint_A_Binary::set_roprd | ( | const boost::shared_ptr< TreeNode > & | roprd | ) | [inline] |
Definition at line 43 of file constraint_a_binary.h.
double ct::common::Constraint_A_Binary::precision_ [protected] |
Precision for comparing floating-point operands
Definition at line 61 of file constraint_a_binary.h.