26
26
/// To get the selection for each node in the problem use the getSelection method.
29
30
typedef std::map<Graph::NodeItr, unsigned, NodeItrComparator> SelectionsMap;
30
31
SelectionsMap selections;
33
unsigned r0Reductions, r1Reductions, r2Reductions, rNReductions;
34
37
/// \brief Number of nodes for which selections have been made.
35
38
/// @return Number of nodes for which selections have been made.
36
39
unsigned numNodes() const { return selections.size(); }
41
/// \brief Records a reduction via the R0 rule. Should be called from the
43
void recordR0() { ++r0Reductions; }
45
/// \brief Returns the number of R0 reductions applied to solve the problem.
46
unsigned numR0Reductions() const { return r0Reductions; }
48
/// \brief Records a reduction via the R1 rule. Should be called from the
50
void recordR1() { ++r1Reductions; }
52
/// \brief Returns the number of R1 reductions applied to solve the problem.
53
unsigned numR1Reductions() const { return r1Reductions; }
55
/// \brief Records a reduction via the R2 rule. Should be called from the
57
void recordR2() { ++r2Reductions; }
59
/// \brief Returns the number of R2 reductions applied to solve the problem.
60
unsigned numR2Reductions() const { return r2Reductions; }
62
/// \brief Records a reduction via the RN rule. Should be called from the
64
void recordRN() { ++ rNReductions; }
66
/// \brief Returns the number of RN reductions applied to solve the problem.
67
unsigned numRNReductions() const { return rNReductions; }
38
69
/// \brief Set the selection for a given node.
39
70
/// @param nItr Node iterator.
40
71
/// @param selection Selection for nItr.