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

ConflictCounts Class Reference

#include <ConflictCounts.h>

List of all members.

Public Member Functions

 ConflictCounts (const Decomposition &decomposition)
 Constructor.
void init (const vlist_type &uninstantiatedVariables)
 Calculate all the conflict counts.
void init (const Variable &variable, Domain &domain)
void done ()
 Clean up the cache.
void setVariable (const Variable &variable)
size_t conflictCount (const Value &value) const
const hash_map< const Value *,
int > & 
conflictCounts (const Variable &variable) const
bool contains (const Variable &variable) const
void clear ()
 Clear the entire cache.
bool empty ()
 Return `true' if the cache is empty, `false' otherwise.


Detailed Description

A cache of conflict counts for values.


Member Function Documentation

size_t ConflictCounts::conflictCount const Value value  )  const
 

Return the conflict count of a given value.

Parameters:
value the value whose conflict count is to be calculated.
Returns:
the conflict count of the given value.

const hash_map< const Value *, int > & ConflictCounts::conflictCounts const Variable variable  )  const
 

Return the map of conflict counts for the values belonging to the domain of a given variable.

Parameters:
variable the variable whose values we're interested in.
Returns:
a hash table of conflict counts.

bool ConflictCounts::contains const Variable variable  )  const [inline]
 

Check whether or not the cache contains data for the values of a given variable.

Parameters:
variable the variable to be looked up.
Returns:
`true' if the cache contains conflict counts for variable's values, `false' otherwise.

void ConflictCounts::init const Variable variable,
Domain domain
 

Calculate the conflict counts for the values in the domain of the given variable.

Parameters:
variable the variable whose values are to be considered.
domain the variable's domain (not available as variable.domain(), as per the logic in Decomposition::selectValue()).

void ConflictCounts::setVariable const Variable variable  )  [inline]
 

Set the variable whose values are to be looked at.

Parameters:
variable the variable whose values are to be looked at.


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