| FreeLing
    4.0
    | 
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>

| 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< int > | best_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 | 
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.
| 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
| void freeling::problem::next_iteration | ( | ) | 
Exchange tables, get ready for next iteration.
| bool freeling::problem::there_are_changes | ( | double | ) | const | 
check whether convergence was achieved
| friend class relax  [friend] | 
| int freeling::problem::CURRENT  [protected] | 
which of both weight sets are we using and which are we computing
| int freeling::problem::NEXT  [protected] | 
| std::vector<std::vector<label> > freeling::problem::vars  [protected] | 
table with variable-labels in the CLP.
 1.7.6.1
 1.7.6.1