LLVM  3.7.0
Public Member Functions | List of all members
llvm::PBQP::Solution Class Reference

Represents a solution to a PBQP problem. More...

#include <Solution.h>

Public Member Functions

 Solution ()
 Initialise an empty solution. More...
 
unsigned numNodes () const
 Number of nodes for which selections have been made. More...
 
void recordR0 ()
 Records a reduction via the R0 rule. More...
 
unsigned numR0Reductions () const
 Returns the number of R0 reductions applied to solve the problem. More...
 
void recordR1 ()
 Records a reduction via the R1 rule. More...
 
unsigned numR1Reductions () const
 Returns the number of R1 reductions applied to solve the problem. More...
 
void recordR2 ()
 Records a reduction via the R2 rule. More...
 
unsigned numR2Reductions () const
 Returns the number of R2 reductions applied to solve the problem. More...
 
void recordRN ()
 Records a reduction via the RN rule. More...
 
unsigned numRNReductions () const
 Returns the number of RN reductions applied to solve the problem. More...
 
void setSelection (GraphBase::NodeId nodeId, unsigned selection)
 Set the selection for a given node. More...
 
unsigned getSelection (GraphBase::NodeId nodeId) const
 Get a node's selection. More...
 

Detailed Description

Represents a solution to a PBQP problem.

To get the selection for each node in the problem use the getSelection method.

Definition at line 27 of file Solution.h.

Constructor & Destructor Documentation

llvm::PBQP::Solution::Solution ( )
inline

Initialise an empty solution.

Definition at line 38 of file Solution.h.

Member Function Documentation

unsigned llvm::PBQP::Solution::getSelection ( GraphBase::NodeId  nodeId) const
inline

Get a node's selection.

Parameters
nodeIdNode id.
Returns
The selection for nodeId;

Definition at line 83 of file Solution.h.

Referenced by llvm::PBQP::backpropagate().

unsigned llvm::PBQP::Solution::numNodes ( ) const
inline

Number of nodes for which selections have been made.

Returns
Number of nodes for which selections have been made.

Definition at line 43 of file Solution.h.

unsigned llvm::PBQP::Solution::numR0Reductions ( ) const
inline

Returns the number of R0 reductions applied to solve the problem.

Definition at line 50 of file Solution.h.

unsigned llvm::PBQP::Solution::numR1Reductions ( ) const
inline

Returns the number of R1 reductions applied to solve the problem.

Definition at line 57 of file Solution.h.

unsigned llvm::PBQP::Solution::numR2Reductions ( ) const
inline

Returns the number of R2 reductions applied to solve the problem.

Definition at line 64 of file Solution.h.

unsigned llvm::PBQP::Solution::numRNReductions ( ) const
inline

Returns the number of RN reductions applied to solve the problem.

Definition at line 71 of file Solution.h.

void llvm::PBQP::Solution::recordR0 ( )
inline

Records a reduction via the R0 rule.

Should be called from the solver only.

Definition at line 47 of file Solution.h.

void llvm::PBQP::Solution::recordR1 ( )
inline

Records a reduction via the R1 rule.

Should be called from the solver only.

Definition at line 54 of file Solution.h.

void llvm::PBQP::Solution::recordR2 ( )
inline

Records a reduction via the R2 rule.

Should be called from the solver only.

Definition at line 61 of file Solution.h.

void llvm::PBQP::Solution::recordRN ( )
inline

Records a reduction via the RN rule.

Should be called from the solver only.

Definition at line 68 of file Solution.h.

void llvm::PBQP::Solution::setSelection ( GraphBase::NodeId  nodeId,
unsigned  selection 
)
inline

Set the selection for a given node.

Parameters
nodeIdNode id.
selectionSelection for nodeId.

Definition at line 76 of file Solution.h.

Referenced by llvm::PBQP::backpropagate().


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