Main Page | Class Hierarchy | Class List | File List | Class Members

Domain Class Reference

#include <Domain.h>

Inheritance diagram for Domain:

VariableOH OrderingHeuristic List of all members.

Public Types

enum  Preference { Minimum, Maximum }

Public Member Functions

 Domain (Decomposition &decomposition, const vector< pair< double, double > > &intervals, double quality=1, Preference preference=Minimum)
virtual void select (vlist_type &selectable, vlist_type &selected)
 Domain ()
 Create an empty domain.
 Domain (Value &value)
 Create a domain with a single value.
 Domain (const Domain &domain)
 Copy constructor.
virtual ~Domain ()
 Destructor.
Valuevalue (id_t id)
 Return the value with the given id.
const Valuevalue (id_t id) const
 Return the value with the given id.
bool operator== (const Domain &other) const
virtual wostream & print (wostream &wos) const

Friends

CSP_API wostream & operator<< (wostream &wos, const Domain &domain)
 Output operator.

Detailed Description

This variable ordering heuristic should return the list of variables with the smallest/largest domain.


Member Enumeration Documentation

enum Domain::Preference
 

Enumeration values:
Minimum  Prefer the smallest domains.
Maximum  Prefer the biggest domains.


Constructor & Destructor Documentation

Domain::Domain Decomposition decomposition,
const vector< pair< double, double > > &  intervals,
double  quality = 1,
Preference  preference = Minimum
 

Constructor.

Parameters:
decomposition the decomposition using this heuristic.
intervals the depth intervals where the heuristic is active; if no intervals are given, the heuristic is always active.
quality the heuristic's quality, in the [0-1] range.
preference the domain size preference.


Member Function Documentation

bool Domain::operator== const Domain other  )  const
 

Equality operator. Note that this compares values by pointer, not by id, so they must belong to the same variable.

wostream & Domain::print wostream &  wos  )  const [virtual]
 

Print the domain at the given stream.

Parameters:
wos the output stream to print to.
Returns:
the given stream.

Reimplemented from VariableOH.

void Domain::select vlist_type &  selectable,
vlist_type &  selected
[virtual]
 

Select the variables with the best domain size, according to the current preference.

Parameters:
selectable the list of variables to select from.
selected selected variables should be moved here.

Implements VariableOH.


The documentation for this class was generated from the following files:
Generated on Wed May 25 12:21:17 2005 for csp.kdevelop by  doxygen 1.3.9.1