#include <IbexShaving.h>

Public Member Functions | |
| Shaving (const Contractor &ctc, REAL ratio=default_ratio, REAL var_ratio=default_var_ratio) | |
| Shaving (const Shaving &s) | |
| virtual Shaving * | copy () const |
| ~Shaving () | |
| void | shave (int var=ALL_VARS) |
| virtual void | contract () |
Public Attributes | |
| const REAL | ratio |
| const REAL | var_ratio |
| Contractor & | ctc |
Static Public Attributes | |
| static const REAL | default_ratio = __IBEX_DEFAULT_SHAVE_RATIO |
| static const REAL | default_var_ratio = __IBEX_DEFAULT_SHAVE_VAR_RATIO |
This class is an implementation of the classical shaving (interval variant of the singleton consistency) algorithm defined in [Lho93].
| ibex::Shaving::Shaving | ( | const Contractor & | ctc, | |
| REAL | ratio = default_ratio, |
|||
| REAL | var_ratio = default_var_ratio | |||
| ) |
Create the shaving contractor for the contractor ctc.
| ctc | - Subcontractor to apply on each slice. | |
| ratio | - Criterion for exiting shaving main loop. If more than ratio times the diameter of a variable domain has been shaved, the procedure loops (all the variables are shaved again). Default value is default_ratio, i.e., infinity (we never loop back again). | |
| var_ratio | - Determine the minimum width of a slice (the slice width must not be greater that var_ratio times the diameter of the current domain being shaved). Default value is default_var_ratio. |
| ibex::Shaving::Shaving | ( | const Shaving & | s | ) |
Duplicate this instance (space is passed by reference).
| ibex::Shaving::~Shaving | ( | ) | [inline] |
Delete this instance.
| virtual Shaving* ibex::Shaving::copy | ( | ) | const [inline, virtual] |
Implement the contractor abstract copy.
Implements ibex::Contractor.
| void ibex::Shaving::shave | ( | int | var = ALL_VARS |
) |
Enforce shaving (3B consistency, Bound consistency, etc.).
| ibex::UnfeasibilityException | - if inconsistency is detected. |
| void ibex::Shaving::contract | ( | ) | [virtual] |
Apply contraction. If the scope field is a specific variable, then shaving will be enforced on this variable. Otherwise, shaving will be made on all variables succesively.
Implements ibex::Contractor.
| const REAL ibex::Shaving::ratio |
Main loop ratio (see constructor for details).
| const REAL ibex::Shaving::var_ratio |
Variable ratio (see constructor for details).
const REAL ibex::Shaving::default_ratio = __IBEX_DEFAULT_SHAVE_RATIO [static] |
Default ratio used to exit the main loop, set to +infinity (__IBEX_DEFAULT_SHAVE_RATIO).
const REAL ibex::Shaving::default_var_ratio = __IBEX_DEFAULT_SHAVE_VAR_RATIO [static] |
Default ratio used to exit one variable shaving, set to 0.1 (__IBEX_DEFAULT_SHAVE_VAR_RATIO).
The sub-contractor
1.5.5