LLVM  4.0.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...
 
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 51 of file Solution.h.

References assert().

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

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 44 of file Solution.h.

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


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