Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

relax Class Reference

The class relax implements a generic solver for consistent labelling problems, using relaxation labelling algorithm. More...

#include <relax.h>

List of all members.

Public Member Functions

 relax (int, double, double)
 Constructor.
void reset (const problem &)
 Prepare for a new problem (i.e. free tables and alloc for the new problem).
void add_constraint (int, int, const list< list< pair< int, int > > > &, double)
 add a new constraint to the problem
void solve ()
 solve consistent labelling problem
list< int > best_label (int) const
 get best label(s) --hopefully only one-- for given variable

Private Member Functions

double NormalizeSupport (double) const
 private methods
bool there_are_changes () const

Private Attributes

vector< vector< label > > vars
 table with variable-labels in the CLP.
int CURRENT
 which of both weight sets are we using and which are we computing
int NEXT
int MaxIter
 Maximum number of iterations in case of not converging.
double ScaleFactor
 Scale factor for label supports.
double Epsilon
 epsilon value to decide whether or not an iteration has caused relevant weight changes


Detailed Description

The class relax implements a generic solver for consistent labelling problems, using relaxation labelling algorithm.


Constructor & Destructor Documentation

relax::relax int  ,
double  ,
double 
 

Constructor.


Member Function Documentation

void relax::add_constraint int  ,
int  ,
const list< list< pair< int, int > > > &  ,
double 
 

add a new constraint to the problem

list<int> relax::best_label int   )  const
 

get best label(s) --hopefully only one-- for given variable

double relax::NormalizeSupport double   )  const [private]
 

private methods

void relax::reset const problem  ) 
 

Prepare for a new problem (i.e. free tables and alloc for the new problem).

void relax::solve  ) 
 

solve consistent labelling problem

bool relax::there_are_changes  )  const [private]
 


Member Data Documentation

int relax::CURRENT [private]
 

which of both weight sets are we using and which are we computing

double relax::Epsilon [private]
 

epsilon value to decide whether or not an iteration has caused relevant weight changes

int relax::MaxIter [private]
 

Maximum number of iterations in case of not converging.

int relax::NEXT [private]
 

double relax::ScaleFactor [private]
 

Scale factor for label supports.

vector<vector<label> > relax::vars [private]
 

table with variable-labels in the CLP.


The documentation for this class was generated from the following file:
Generated on Wed Apr 26 12:58:50 2006 for FreeLing by  doxygen 1.4.4