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

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

#include "llvm/CodeGen/PBQP/Solution.h"

Public Member Functions

 Solution ()=default
 Initialise an empty solution.
 
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.
 

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

Constructor & Destructor Documentation

◆ Solution()

llvm::PBQP::Solution::Solution ( )
default

Initialise an empty solution.

Member Function Documentation

◆ getSelection()

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

References assert().

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

◆ setSelection()

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

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


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