ibex::Shaving Class Reference
[Contractors]

Shaving contractor. More...

#include <IbexShaving.h>

Inheritance diagram for ibex::Shaving:

ibex::Contractor ibex::Operator

List of all members.

Public Member Functions

 Shaving (const Contractor &ctc, REAL ratio=default_ratio, REAL var_ratio=default_var_ratio)
 Shaving (const Shaving &s)
virtual Shavingcopy () const
 ~Shaving ()
void shave (int var=ALL_VARS)
virtual void contract ()

Public Attributes

const REAL ratio
const REAL var_ratio
Contractorctc

Static Public Attributes

static const REAL default_ratio = __IBEX_DEFAULT_SHAVE_RATIO
static const REAL default_var_ratio = __IBEX_DEFAULT_SHAVE_VAR_RATIO


Detailed Description

Shaving contractor.

This class is an implementation of the classical shaving (interval variant of the singleton consistency) algorithm defined in [Lho93].

Author:
Gilles Chabert, Bertrand Neveu
Date:
March 2007

Constructor & Destructor Documentation

ibex::Shaving::Shaving ( const Contractor ctc,
REAL  ratio = default_ratio,
REAL  var_ratio = default_var_ratio 
)

Create the shaving contractor for the contractor ctc.

Parameters:
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.


Member Function Documentation

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.).

Exceptions:
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.


Member Data Documentation

Main loop ratio (see constructor for details).

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


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

Generated on Sun Jun 27 15:52:00 2010 for IBEX by  doxygen 1.5.5