LLVM API Documentation
Represents a solution to a PBQP problem. More...
#include <Solution.h>
Public Member Functions | |
Solution () | |
Initialise an empty solution. | |
unsigned | numNodes () const |
Number of nodes for which selections have been made. | |
void | recordR0 () |
Records a reduction via the R0 rule. Should be called from the solver only. | |
unsigned | numR0Reductions () const |
Returns the number of R0 reductions applied to solve the problem. | |
void | recordR1 () |
Records a reduction via the R1 rule. Should be called from the solver only. | |
unsigned | numR1Reductions () const |
Returns the number of R1 reductions applied to solve the problem. | |
void | recordR2 () |
Records a reduction via the R2 rule. Should be called from the solver only. | |
unsigned | numR2Reductions () const |
Returns the number of R2 reductions applied to solve the problem. | |
void | recordRN () |
Records a reduction via the RN rule. Should be called from the solver only. | |
unsigned | numRNReductions () const |
Returns the number of RN reductions applied to solve the problem. | |
void | setSelection (GraphBase::NodeId nodeId, unsigned selection) |
Set the selection for a given node. | |
unsigned | getSelection (GraphBase::NodeId nodeId) const |
Get a node's selection. |
Represents a solution to a PBQP problem.
To get the selection for each node in the problem use the getSelection method.
Definition at line 26 of file Solution.h.
PBQP::Solution::Solution | ( | ) | [inline] |
Initialise an empty solution.
Definition at line 37 of file Solution.h.
unsigned PBQP::Solution::getSelection | ( | GraphBase::NodeId | nodeId | ) | const [inline] |
Get a node's selection.
nodeId | Node id. |
Definition at line 82 of file Solution.h.
Referenced by PBQP::backpropagate().
unsigned PBQP::Solution::numNodes | ( | ) | const [inline] |
Number of nodes for which selections have been made.
Definition at line 42 of file Solution.h.
unsigned PBQP::Solution::numR0Reductions | ( | ) | const [inline] |
Returns the number of R0 reductions applied to solve the problem.
Definition at line 49 of file Solution.h.
unsigned PBQP::Solution::numR1Reductions | ( | ) | const [inline] |
Returns the number of R1 reductions applied to solve the problem.
Definition at line 56 of file Solution.h.
unsigned PBQP::Solution::numR2Reductions | ( | ) | const [inline] |
Returns the number of R2 reductions applied to solve the problem.
Definition at line 63 of file Solution.h.
unsigned PBQP::Solution::numRNReductions | ( | ) | const [inline] |
Returns the number of RN reductions applied to solve the problem.
Definition at line 70 of file Solution.h.
void PBQP::Solution::recordR0 | ( | ) | [inline] |
Records a reduction via the R0 rule. Should be called from the solver only.
Definition at line 46 of file Solution.h.
void PBQP::Solution::recordR1 | ( | ) | [inline] |
Records a reduction via the R1 rule. Should be called from the solver only.
Definition at line 53 of file Solution.h.
void PBQP::Solution::recordR2 | ( | ) | [inline] |
Records a reduction via the R2 rule. Should be called from the solver only.
Definition at line 60 of file Solution.h.
void PBQP::Solution::recordRN | ( | ) | [inline] |
Records a reduction via the RN rule. Should be called from the solver only.
Definition at line 67 of file Solution.h.
void PBQP::Solution::setSelection | ( | GraphBase::NodeId | nodeId, |
unsigned | selection | ||
) | [inline] |
Set the selection for a given node.
nodeId | Node id. |
selection | Selection for nodeId. |
Definition at line 75 of file Solution.h.
Referenced by PBQP::backpropagate().