Generated on Tue Feb 11 2025 17:33:26 for Gecode by doxygen 1.12.0
arithmetic.cpp File Reference
#include "test/float.hh"
#include <gecode/minimodel.hh>
#include <cmath>
#include <algorithm>

Go to the source code of this file.

Classes

class  Test::Float::Arithmetic::MultXYZ
 Test for multiplication constraint More...
 
class  Test::Float::Arithmetic::MultXYZSol
 Test for multiplication constraint when solution is ensured More...
 
class  Test::Float::Arithmetic::MultXXY
 Test for multiplication constraint with shared variables More...
 
class  Test::Float::Arithmetic::MultXXYSol
 Test for multiplication constraint with shared variables when solution is ensured More...
 
class  Test::Float::Arithmetic::MultXYX
 Test for multiplication constraint with shared variables More...
 
class  Test::Float::Arithmetic::MultXYY
 Test for multiplication constraint with shared variables More...
 
class  Test::Float::Arithmetic::MultXXX
 Test for multiplication constraint with shared variables More...
 
class  Test::Float::Arithmetic::Div
 Test for division constraint More...
 
class  Test::Float::Arithmetic::DivSol
 Test for division constraint when solution is ensured More...
 
class  Test::Float::Arithmetic::SqrXY
 Test for squaring constraint More...
 
class  Test::Float::Arithmetic::SqrXYSol
 Test for squaring constraint where solution is ensured More...
 
class  Test::Float::Arithmetic::SqrXX
 Test for squaring constraint with shared variables More...
 
class  Test::Float::Arithmetic::SqrtXY
 Test for square root constraint More...
 
class  Test::Float::Arithmetic::SqrtXYSol
 Test for square root constraint where solution is ensured More...
 
class  Test::Float::Arithmetic::SqrtXX
 Test for square root constraint with shared variables More...
 
class  Test::Float::Arithmetic::PowXY
 Test for pow constraint More...
 
class  Test::Float::Arithmetic::PowXYSol
 Test for pow constraint where solution is ensured More...
 
class  Test::Float::Arithmetic::PowXX
 Test for pow constraint with shared variables More...
 
class  Test::Float::Arithmetic::NRootXY
 Test for nroot constraint More...
 
class  Test::Float::Arithmetic::NRootXYSol
 Test for nroot constraint where solution is ensured More...
 
class  Test::Float::Arithmetic::NRootXX
 Test for nroot constraint with shared variables More...
 
class  Test::Float::Arithmetic::AbsXY
 Test for absolute value constraint More...
 
class  Test::Float::Arithmetic::AbsXX
 Test for absolute value constraint with shared variables More...
 
class  Test::Float::Arithmetic::MinXYZ
 Test for binary minimum constraint More...
 
class  Test::Float::Arithmetic::MinXXY
 Test for binary minimum constraint with shared variables More...
 
class  Test::Float::Arithmetic::MinXYX
 Test for binary minimum constraint with shared variables More...
 
class  Test::Float::Arithmetic::MinXYY
 Test for binary minimum constraint with shared variables More...
 
class  Test::Float::Arithmetic::MinXXX
 Test for binary minimum constraint with shared variables More...
 
class  Test::Float::Arithmetic::MaxXYZ
 Test for binary maximum constraint More...
 
class  Test::Float::Arithmetic::MaxXXY
 Test for binary maximum constraint with shared variables More...
 
class  Test::Float::Arithmetic::MaxXYX
 Test for binary maximum constraint with shared variables More...
 
class  Test::Float::Arithmetic::MaxXYY
 Test for binary maximum constraint with shared variables More...
 
class  Test::Float::Arithmetic::MaxXXX
 Test for binary maximum constraint with shared variables More...
 
class  Test::Float::Arithmetic::MinNary
 Test for n-ary minimmum constraint More...
 
class  Test::Float::Arithmetic::MinNaryShared
 Test for n-ary minimmum constraint with shared variables More...
 
class  Test::Float::Arithmetic::MaxNary
 Test for n-ary maximum constraint More...
 
class  Test::Float::Arithmetic::MaxNaryShared
 Test for n-ary maximum constraint with shared variables More...
 

Namespaces

namespace  Test
 General test support.
 
namespace  Test::Float
 Testing domain floats.
 
namespace  Test::Float::Arithmetic
 Tests for arithmetic constraints
 

Variables

const Gecode::FloatNum Test::Float::Arithmetic::step = 0.15
 
Gecode::FloatVal Test::Float::Arithmetic::a (-8, 5)
 
Gecode::FloatVal Test::Float::Arithmetic::b (9, 12)
 
Gecode::FloatVal Test::Float::Arithmetic::c (-8, 8)
 
MultXXY Test::Float::Arithmetic::mult_xxy_a ("A", a, step)
 
MultXXY Test::Float::Arithmetic::mult_xxy_b ("B", b, step)
 
MultXXY Test::Float::Arithmetic::mult_xxy_c ("C", c, step)
 
MultXXYSol Test::Float::Arithmetic::mult_xxy_sol_a ("A", a, step)
 
MultXXYSol Test::Float::Arithmetic::mult_xxy_sol_b ("B", b, step)
 
MultXXYSol Test::Float::Arithmetic::mult_xxy_sol_c ("C", c, step)
 
MultXYX Test::Float::Arithmetic::mult_xyx_a ("A", a, step)
 
MultXYX Test::Float::Arithmetic::mult_xyx_b ("B", b, step)
 
MultXYX Test::Float::Arithmetic::mult_xyx_c ("C", c, step)
 
MultXYY Test::Float::Arithmetic::mult_xyy_a ("A", a, step)
 
MultXYY Test::Float::Arithmetic::mult_xyy_b ("B", b, step)
 
MultXYY Test::Float::Arithmetic::mult_xyy_c ("C", c, step)
 
MultXXX Test::Float::Arithmetic::mult_xxx_a ("A", a, step)
 
MultXXX Test::Float::Arithmetic::mult_xxx_b ("B", b, step)
 
MultXXX Test::Float::Arithmetic::mult_xxx_c ("C", c, step)
 
MultXYZ Test::Float::Arithmetic::mult_xyz_a ("A", a, step)
 
MultXYZ Test::Float::Arithmetic::mult_xyz_b ("B", b, step)
 
MultXYZ Test::Float::Arithmetic::mult_xyz_c ("C", c, step)
 
MultXYZSol Test::Float::Arithmetic::mult_xyz_sol_a ("A", a, step)
 
MultXYZSol Test::Float::Arithmetic::mult_xyz_sol_b ("B", b, step)
 
MultXYZSol Test::Float::Arithmetic::mult_xyz_sol_c ("C", c, step)
 
Div Test::Float::Arithmetic::div_a ("A", a, step)
 
Div Test::Float::Arithmetic::div_b ("B", b, step)
 
Div Test::Float::Arithmetic::div_c ("C", c, step)
 
DivSol Test::Float::Arithmetic::div_sol_a ("A", a, step)
 
DivSol Test::Float::Arithmetic::div_sol_b ("B", b, step)
 
DivSol Test::Float::Arithmetic::div_sol_c ("C", c, step)
 
SqrXY Test::Float::Arithmetic::sqr_xy_a ("A", a, step)
 
SqrXY Test::Float::Arithmetic::sqr_xy_b ("B", b, step)
 
SqrXY Test::Float::Arithmetic::sqr_xy_c ("C", c, step)
 
SqrXYSol Test::Float::Arithmetic::sqr_xy_sol_a ("A", a, step)
 
SqrXYSol Test::Float::Arithmetic::sqr_xy_sol_b ("B", b, step)
 
SqrXYSol Test::Float::Arithmetic::sqr_xy_sol_c ("C", c, step)
 
SqrXX Test::Float::Arithmetic::sqr_xx_a ("A", a, step)
 
SqrXX Test::Float::Arithmetic::sqr_xx_b ("B", b, step)
 
SqrXX Test::Float::Arithmetic::sqr_xx_c ("C", c, step)
 
SqrtXY Test::Float::Arithmetic::sqrt_xy_a ("A", a, step)
 
SqrtXY Test::Float::Arithmetic::sqrt_xy_b ("B", b, step)
 
SqrtXY Test::Float::Arithmetic::sqrt_xy_c ("C", c, step)
 
SqrtXYSol Test::Float::Arithmetic::sqrt_xy_sol_a ("A", a, step)
 
SqrtXYSol Test::Float::Arithmetic::sqrt_xy_sol_b ("B", b, step)
 
SqrtXYSol Test::Float::Arithmetic::sqrt_xy_sol_c ("C", c, step)
 
SqrtXX Test::Float::Arithmetic::sqrt_xx_a ("A", a, step)
 
SqrtXX Test::Float::Arithmetic::sqrt_xx_b ("B", b, step)
 
SqrtXX Test::Float::Arithmetic::sqrt_xx_c ("C", c, step)
 
PowXY Test::Float::Arithmetic::pow_xy_a_1 ("A", a, 2, step)
 
PowXY Test::Float::Arithmetic::pow_xy_b_1 ("B", b, 2, step)
 
PowXY Test::Float::Arithmetic::pow_xy_c_1 ("C", c, 2, step)
 
PowXYSol Test::Float::Arithmetic::pow_xy_sol_a_1 ("A", a, 2, step)
 
PowXYSol Test::Float::Arithmetic::pow_xy_sol_b_1 ("B", b, 2, step)
 
PowXYSol Test::Float::Arithmetic::pow_xy_sol_c_1 ("C", c, 2, step)
 
PowXX Test::Float::Arithmetic::pow_xx_a_1 ("A", a, 2, step)
 
PowXX Test::Float::Arithmetic::pow_xx_b_1 ("B", b, 2, step)
 
PowXX Test::Float::Arithmetic::pow_xx_c_1 ("C", c, 2, step)
 
PowXY Test::Float::Arithmetic::pow_xy_a_2 ("A", a, 3, step)
 
PowXY Test::Float::Arithmetic::pow_xy_b_2 ("B", b, 3, step)
 
PowXY Test::Float::Arithmetic::pow_xy_c_2 ("C", c, 3, step)
 
PowXYSol Test::Float::Arithmetic::pow_xy_sol_a_2 ("A", a, 3, step)
 
PowXYSol Test::Float::Arithmetic::pow_xy_sol_b_2 ("B", b, 3, step)
 
PowXYSol Test::Float::Arithmetic::pow_xy_sol_c_2 ("C", c, 3, step)
 
PowXX Test::Float::Arithmetic::pow_xx_a_2 ("A", a, 3, step)
 
PowXX Test::Float::Arithmetic::pow_xx_b_2 ("B", b, 3, step)
 
PowXX Test::Float::Arithmetic::pow_xx_c_2 ("C", c, 3, step)
 
PowXY Test::Float::Arithmetic::pow_xy_a_3 ("A", a, 0, step)
 
PowXY Test::Float::Arithmetic::pow_xy_b_3 ("B", b, 0, step)
 
PowXY Test::Float::Arithmetic::pow_xy_c_3 ("C", c, 0, step)
 
PowXYSol Test::Float::Arithmetic::pow_xy_sol_a_3 ("A", a, 0, step)
 
PowXYSol Test::Float::Arithmetic::pow_xy_sol_b_3 ("B", b, 0, step)
 
PowXYSol Test::Float::Arithmetic::pow_xy_sol_c_3 ("C", c, 0, step)
 
PowXX Test::Float::Arithmetic::pow_xx_a_3 ("A", a, 0, step)
 
PowXX Test::Float::Arithmetic::pow_xx_b_3 ("B", b, 0, step)
 
PowXX Test::Float::Arithmetic::pow_xx_c_3 ("C", c, 0, step)
 
NRootXY Test::Float::Arithmetic::nroot_xy_a_1 ("A", a, 2, step)
 
NRootXY Test::Float::Arithmetic::nroot_xy_b_1 ("B", b, 2, step)
 
NRootXY Test::Float::Arithmetic::nroot_xy_c_1 ("C", c, 2, step)
 
NRootXYSol Test::Float::Arithmetic::nroot_xy_sol_a_1 ("A", a, 2, step)
 
NRootXYSol Test::Float::Arithmetic::nroot_xy_sol_b_1 ("B", b, 2, step)
 
NRootXYSol Test::Float::Arithmetic::nroot_xy_sol_c_1 ("C", c, 2, step)
 
NRootXX Test::Float::Arithmetic::nroot_xx_a_1 ("A", a, 2, step)
 
NRootXX Test::Float::Arithmetic::nroot_xx_b_1 ("B", b, 2, step)
 
NRootXX Test::Float::Arithmetic::nroot_xx_c_1 ("C", c, 2, step)
 
NRootXY Test::Float::Arithmetic::nroot_xy_a_2 ("A", a, 3, step)
 
NRootXY Test::Float::Arithmetic::nroot_xy_b_2 ("B", b, 3, step)
 
NRootXY Test::Float::Arithmetic::nroot_xy_c_2 ("C", c, 3, step)
 
NRootXYSol Test::Float::Arithmetic::nroot_xy_sol_a_2 ("A", a, 3, step)
 
NRootXYSol Test::Float::Arithmetic::nroot_xy_sol_b_2 ("B", b, 3, step)
 
NRootXYSol Test::Float::Arithmetic::nroot_xy_sol_c_2 ("C", c, 3, step)
 
NRootXX Test::Float::Arithmetic::nroot_xx_a_2 ("A", a, 3, step)
 
NRootXX Test::Float::Arithmetic::nroot_xx_b_2 ("B", b, 3, step)
 
NRootXX Test::Float::Arithmetic::nroot_xx_c_2 ("C", c, 3, step)
 
NRootXY Test::Float::Arithmetic::nroot_xy_a_3 ("A", a, 0, step)
 
NRootXY Test::Float::Arithmetic::nroot_xy_b_3 ("B", b, 0, step)
 
NRootXY Test::Float::Arithmetic::nroot_xy_c_3 ("C", c, 0, step)
 
NRootXYSol Test::Float::Arithmetic::nroot_xy_sol_a_3 ("A", a, 0, step)
 
NRootXYSol Test::Float::Arithmetic::nroot_xy_sol_b_3 ("B", b, 0, step)
 
NRootXYSol Test::Float::Arithmetic::nroot_xy_sol_c_3 ("C", c, 0, step)
 
NRootXX Test::Float::Arithmetic::nroot_xx_a_3 ("A", a, 0, step)
 
NRootXX Test::Float::Arithmetic::nroot_xx_b_3 ("B", b, 0, step)
 
NRootXX Test::Float::Arithmetic::nroot_xx_c_3 ("C", c, 0, step)
 
AbsXY Test::Float::Arithmetic::abs_xy_a ("A", a, step)
 
AbsXY Test::Float::Arithmetic::abs_xy_b ("B", b, step)
 
AbsXY Test::Float::Arithmetic::abs_xy_c ("C", c, step)
 
AbsXX Test::Float::Arithmetic::abs_xx_a ("A", a, step)
 
AbsXX Test::Float::Arithmetic::abs_xx_b ("B", b, step)
 
AbsXX Test::Float::Arithmetic::abs_xx_c ("C", c, step)
 
MinXYZ Test::Float::Arithmetic::min_xyz_a ("A", a, step)
 
MinXYZ Test::Float::Arithmetic::min_xyz_b ("B", b, step)
 
MinXYZ Test::Float::Arithmetic::min_xyz_c ("C", c, step)
 
MinXXY Test::Float::Arithmetic::min_xxy_a ("A", a, step)
 
MinXXY Test::Float::Arithmetic::min_xxy_b ("B", b, step)
 
MinXXY Test::Float::Arithmetic::min_xxy_c ("C", c, step)
 
MinXYX Test::Float::Arithmetic::min_xyx_a ("A", a, step)
 
MinXYX Test::Float::Arithmetic::min_xyx_b ("B", b, step)
 
MinXYX Test::Float::Arithmetic::min_xyx_c ("C", c, step)
 
MinXYY Test::Float::Arithmetic::min_xyy_a ("A", a, step)
 
MinXYY Test::Float::Arithmetic::min_xyy_b ("B", b, step)
 
MinXYY Test::Float::Arithmetic::min_xyy_c ("C", c, step)
 
MinXXX Test::Float::Arithmetic::min_xxx_a ("A", a, step)
 
MinXXX Test::Float::Arithmetic::min_xxx_b ("B", b, step)
 
MinXXX Test::Float::Arithmetic::min_xxx_c ("C", c, step)
 
MaxXYZ Test::Float::Arithmetic::max_xyz_a ("A", a, step)
 
MaxXYZ Test::Float::Arithmetic::max_xyz_b ("B", b, step)
 
MaxXYZ Test::Float::Arithmetic::max_xyz_c ("C", c, step)
 
MaxXXY Test::Float::Arithmetic::max_xxy_a ("A", a, step)
 
MaxXXY Test::Float::Arithmetic::max_xxy_b ("B", b, step)
 
MaxXXY Test::Float::Arithmetic::max_xxy_c ("C", c, step)
 
MaxXYX Test::Float::Arithmetic::max_xyx_a ("A", a, step)
 
MaxXYX Test::Float::Arithmetic::max_xyx_b ("B", b, step)
 
MaxXYX Test::Float::Arithmetic::max_xyx_c ("C", c, step)
 
MaxXYY Test::Float::Arithmetic::max_xyy_a ("A", a, step)
 
MaxXYY Test::Float::Arithmetic::max_xyy_b ("B", b, step)
 
MaxXYY Test::Float::Arithmetic::max_xyy_c ("C", c, step)
 
MaxXXX Test::Float::Arithmetic::max_xxx_a ("A", a, step)
 
MaxXXX Test::Float::Arithmetic::max_xxx_b ("B", b, step)
 
MaxXXX Test::Float::Arithmetic::max_xxx_c ("C", c, step)
 
MinNary Test::Float::Arithmetic::min_nary
 
MinNaryShared Test::Float::Arithmetic::min_s_nary
 
MaxNary Test::Float::Arithmetic::max_nary
 
MaxNaryShared Test::Float::Arithmetic::max_s_nary