arithmetic.cpp File Reference
#include "test/int.hh"#include <cmath>#include <algorithm>#include <memory>#include <gecode/minimodel.hh>Go to the source code of this file.
Classes | |
| class | Test::Int::Arithmetic::GcdXYZ |
| Test for the ternary greatest-common-divisor constraint More... | |
| class | Test::Int::Arithmetic::GcdXXY |
| Test for gcd with identical operands More... | |
| class | Test::Int::Arithmetic::GcdXYX |
| Test for gcd with result aliased to the first operand More... | |
| class | Test::Int::Arithmetic::GcdXXX |
| Test for gcd with all variables aliased More... | |
| class | Test::Int::Arithmetic::DividesXY |
| Test for the reified divisibility constraint More... | |
| class | Test::Int::Arithmetic::DividesXX |
| Test divisibility with aliased operands More... | |
| class | Test::Int::Arithmetic::NumberTheoryAlgebraic |
| Algebraic deductions must not wait for unrelated variables to be fixed. More... | |
| class | Test::Int::Arithmetic::NumberTheorySparseBounds |
| Sparse endpoints must reach a fixpoint after a divisor is assigned. More... | |
| class | Test::Int::Arithmetic::NumberTheoryLifecycle |
| Activation and rescheduling survive cloning and arithmetic rewrites. More... | |
| class | Test::Int::Arithmetic::NumberTheoryIdentities |
| Reified identities do not require the remaining factors to be fixed. More... | |
| class | Test::Int::Arithmetic::NumberTheoryLimits |
| Known identities at the integer limits, independent of the oracles. More... | |
| class | Test::Int::Arithmetic::ProductModLimits |
| Known modular residues whose unreduced product exceeds 64 bits. More... | |
| class | Test::Int::Arithmetic::ProductXYZR |
| Test for an ordinary and reified three-factor product More... | |
| class | Test::Int::Arithmetic::ProductEmpty |
| Test for the empty product More... | |
| class | Test::Int::Arithmetic::ProductSingleton |
| Test for the singleton product More... | |
| class | Test::Int::Arithmetic::ProductXXYAlias |
| Test repeated factors and result aliasing More... | |
| class | Test::Int::Arithmetic::ProductInterleaved |
| Interleaved powers exercise grouping, cofactors, and cloned rewrites. More... | |
| class | Test::Int::Arithmetic::ProductBoundsLarge |
| Test forward and inverse product bounds on large factor domains More... | |
| class | Test::Int::Arithmetic::ProductBoundsLarge::TestSpace |
| class | Test::Int::Arithmetic::ProductSimplifySign |
| Test zero, unit, and aggregate-sign product simplifications. More... | |
| class | Test::Int::Arithmetic::ProductSimplifySign::TestSpace |
| class | Test::Int::Arithmetic::ProductSimplifySign::CloneSpace |
| class | Test::Int::Arithmetic::ProductPowerAlias |
| Test repeated powers and result-alias cancellation. More... | |
| class | Test::Int::Arithmetic::ProductPowerAlias::TestSpace |
| class | Test::Int::Arithmetic::ProductInverseBounds |
| Test zero-aware inverse bounds for every cofactor sign class. More... | |
| class | Test::Int::Arithmetic::ProductInverseBounds::TestSpace |
| class | Test::Int::Arithmetic::ProductCompactionZero |
| Unit compaction must finish before a zero factor subsumes the actor. More... | |
| class | Test::Int::Arithmetic::ProductModXYZR |
| Test for an ordinary and reified three-factor modular product More... | |
| class | Test::Int::Arithmetic::ProductModCoefficient |
| Assigned coefficients with several free factors and all reification modes. More... | |
| class | Test::Int::Arithmetic::ProductModFolded |
| Folded coefficients, repeated factors, and products beyond machine range. More... | |
| class | Test::Int::Arithmetic::ProductModNonzero |
| A nonzero modular result excludes every zero factor. More... | |
| class | Test::Int::Arithmetic::ProductModEmpty |
| Test for the empty modular product, including modulus one More... | |
| class | Test::Int::Arithmetic::ProductModSingleton |
| Test for a singleton modular product More... | |
| class | Test::Int::Arithmetic::ProductModXXYAlias |
| Test repeated factors with the result aliased to a factor More... | |
| class | Test::Int::Arithmetic::ProductModAlgebraic |
| Targeted algebraic and quotient-band propagation for fixed modulus. More... | |
| class | Test::Int::Arithmetic::ProductModAlgebraic::TestSpace |
| class | Test::Int::Arithmetic::ProductModVarXYMR |
| Test for an ordinary two-factor product with a variable modulus More... | |
| class | Test::Int::Arithmetic::ProductModVarEmpty |
| Test for the empty product with a variable modulus More... | |
| class | Test::Int::Arithmetic::ProductModVarSingleton |
| Test for a singleton product with a variable modulus More... | |
| class | Test::Int::Arithmetic::ProductModVarRepeated |
| Test repeated factors with a variable modulus More... | |
| class | Test::Int::Arithmetic::ProductModVarModFactorAlias |
| Test modulus/factor aliasing More... | |
| class | Test::Int::Arithmetic::ProductModVarFactorResultAlias |
| Test factor/result aliasing More... | |
| class | Test::Int::Arithmetic::ProductModVarModResultAlias |
| Test modulus/result aliasing, which is necessarily inconsistent More... | |
| class | Test::Int::Arithmetic::ProductModVarBounds |
| Targeted bounds and arithmetic checks for a variable modulus. More... | |
| class | Test::Int::Arithmetic::ProductModVarBounds::TestSpace |
| class | Test::Int::Arithmetic::ProductModVarSparseModulus |
| Modulus bounds must reach a fixpoint after jumping over a domain hole. More... | |
| class | Test::Int::Arithmetic::ProductModVarAlgebraic |
| Targeted algebraic propagation for a variable modulus. More... | |
| class | Test::Int::Arithmetic::ProductModVarAlgebraic::TestSpace |
| class | Test::Int::Arithmetic::ProductModVarInactive |
| Inactive implications preserve every assignment in the input domains. More... | |
| class | Test::Int::Arithmetic::ProductModInvalidModulus |
| Test that a nonpositive modular-product modulus is rejected More... | |
| class | Test::Int::Arithmetic::ProductModInvalidModulus::TestSpace |
| class | Test::Int::Arithmetic::MultXYZ |
| Test for multiplication constraint More... | |
| class | Test::Int::Arithmetic::MultXXY |
| Test for multiplication constraint with shared variables More... | |
| class | Test::Int::Arithmetic::MultXYX |
| Test for multiplication constraint with shared variables More... | |
| class | Test::Int::Arithmetic::MultXYY |
| Test for multiplication constraint with shared variables More... | |
| class | Test::Int::Arithmetic::MultXXX |
| Test for multiplication constraint with shared variables More... | |
| class | Test::Int::Arithmetic::SqrXY |
| Test for squaring constraint More... | |
| class | Test::Int::Arithmetic::SqrXX |
| Test for squaring constraint with shared variables More... | |
| class | Test::Int::Arithmetic::SqrtXY |
| Test for square root constraint More... | |
| class | Test::Int::Arithmetic::SqrtXX |
| Test for square root constraint with shared variables More... | |
| class | Test::Int::Arithmetic::PowXY |
| Test for power constraint More... | |
| class | Test::Int::Arithmetic::PowXX |
| Test for power constraint with shared variables More... | |
| class | Test::Int::Arithmetic::NrootXY |
| Test for nroot constraint More... | |
| class | Test::Int::Arithmetic::NrootXX |
| Test for nroot constraint with shared variables More... | |
| class | Test::Int::Arithmetic::DivMod |
| Test for division/modulo constraint More... | |
| class | Test::Int::Arithmetic::Div |
| Test for division constraint More... | |
| class | Test::Int::Arithmetic::Mod |
| Test for modulo constraint More... | |
| class | Test::Int::Arithmetic::AbsXY |
| Test for absolute value constraint More... | |
| class | Test::Int::Arithmetic::AbsXX |
| Test for absolute value constraint with shared variables More... | |
| class | Test::Int::Arithmetic::MinXYZ |
| Test for binary minimum constraint More... | |
| class | Test::Int::Arithmetic::MinXXY |
| Test for binary minimum constraint with shared variables More... | |
| class | Test::Int::Arithmetic::MinXYX |
| Test for binary minimum constraint with shared variables More... | |
| class | Test::Int::Arithmetic::MinXYY |
| Test for binary minimum constraint with shared variables More... | |
| class | Test::Int::Arithmetic::MinXXX |
| Test for binary minimum constraint with shared variables More... | |
| class | Test::Int::Arithmetic::MaxXYZ |
| Test for binary maximum constraint More... | |
| class | Test::Int::Arithmetic::MaxXXY |
| Test for binary maximum constraint with shared variables More... | |
| class | Test::Int::Arithmetic::MaxXYX |
| Test for binary maximum constraint with shared variables More... | |
| class | Test::Int::Arithmetic::MaxXYY |
| Test for binary maximum constraint with shared variables More... | |
| class | Test::Int::Arithmetic::MaxXXX |
| Test for binary maximum constraint with shared variables More... | |
| class | Test::Int::Arithmetic::MinNary |
| Test for n-ary minimmum constraint More... | |
| class | Test::Int::Arithmetic::MinNaryShared |
| Test for n-ary minimmum constraint with shared variables More... | |
| class | Test::Int::Arithmetic::MaxNary |
| Test for n-ary maximum constraint More... | |
| class | Test::Int::Arithmetic::MaxNaryShared |
| Test for n-ary maximum constraint with shared variables More... | |
| class | Test::Int::Arithmetic::ArgMax |
| Test for argument maximum constraint More... | |
| class | Test::Int::Arithmetic::ArgMaxShared |
| Test for argument maximum constraint with shared variables More... | |
| class | Test::Int::Arithmetic::ArgMin |
| Test for argument minimum constraint More... | |
| class | Test::Int::Arithmetic::ArgMinShared |
| Test for argument minimum constraint with shared variables More... | |
| class | Test::Int::Arithmetic::ArgMaxBool |
| Test for Boolean argument maximum constraint More... | |
| class | Test::Int::Arithmetic::ArgMaxBoolShared |
| Test for argument maximum constraint with shared variables More... | |
| class | Test::Int::Arithmetic::ArgMinBool |
| Test for argument minimum constraint More... | |
| class | Test::Int::Arithmetic::ArgMinBoolShared |
| Test for argument minimum constraint with shared variables More... | |
| class | Test::Int::Arithmetic::Create |
| Help class to create and register tests. More... | |
Namespaces | |
| namespace | Test |
| General test support. | |
| namespace | Test::Int |
| Testing finite domain integers. | |
| namespace | Test::Int::Arithmetic |
| Tests for arithmetic constraints | |
Functions | |
| int | Test::Int::Arithmetic::gcd_value (int a, int b) |
| Compute the mathematical greatest common divisor for testing. | |
| bool | Test::Int::Arithmetic::arithmetic_failed (const std::string &what, const Gecode::VarArgArray< Gecode::IntVar > &x) |
| Report a targeted arithmetic failure through the standard test log. | |
| bool | Test::Int::Arithmetic::product_value (const Assignment &x, int n, int &product) |
| Evaluate an exact product for testing without overflowing. | |
| int | Test::Int::Arithmetic::product_mod_value (const Assignment &x, int n, int m) |
| Compute a canonical modular product for testing. | |
| bool | Test::Int::Arithmetic::powgr (int n, long long int r, int x) |
| int | Test::Int::Arithmetic::fnroot (int n, int x) |
| bool | Test::Int::Arithmetic::powle (int n, long long int r, int x) |
| int | Test::Int::Arithmetic::cnroot (int n, int x) |
Variables | |
| Create | Test::Int::Arithmetic::c |
