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 std::list< std::list< std::pair< int, int > > > &, double)
 add a new constraint to the problem
void solve ()
 solve consistent labelling problem
std::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

std::vector< std::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 std::list< std::list< std::pair< int, int > > > &  ,
double   
)

add a new constraint to the problem

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

std::vector<std::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 Tue Jul 27 16:29:33 2010 for FreeLing by  doxygen 1.6.3