FreeLing  4.0
Public Member Functions | Protected Attributes | Friends
freeling::problem Class Reference

The class problem stores the structure of a problem, namely, a vector with a position for each variable to consider, and for each variable, a list of initial weights for each possible label. More...

#include <relax.h>

Collaboration diagram for freeling::problem:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 problem (int)
 Constructor.
void add_label (int, double)
 add a label (and its weight) to the given variable
void add_constraint (int, int, const std::list< std::list< std::pair< int, int > > > &, double)
 add a new constraint to the problem
std::list< intbest_label (int) const
 get best label(s) --hopefully only one-- for given variable
bool there_are_changes (double) const
 check whether convergence was achieved
void next_iteration ()
 Exchange tables, get ready for next iteration.

Protected 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

Friends

class relax

Detailed Description

The class problem stores the structure of a problem, namely, a vector with a position for each variable to consider, and for each variable, a list of initial weights for each possible label.

Variables and labels are unnamed, and sequentially numbered. The caller application must keep track of the meaning of each variable and label position.


Constructor & Destructor Documentation

Constructor.


Member Function Documentation

void freeling::problem::add_constraint ( int  ,
int  ,
const std::list< std::list< std::pair< int, int > > > &  ,
double   
)

add a new constraint to the problem

void freeling::problem::add_label ( int  ,
double   
)

add a label (and its weight) to the given variable

std::list<int> freeling::problem::best_label ( int  ) const

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

Exchange tables, get ready for next iteration.

bool freeling::problem::there_are_changes ( double  ) const

check whether convergence was achieved


Friends And Related Function Documentation

friend class relax [friend]

Member Data Documentation

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

std::vector<std::vector<label> > freeling::problem::vars [protected]

table with variable-labels in the CLP.


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