LLVM API Documentation
#include <HeuristicSolver.h>
Public Types | |
| typedef HSITypes< typename Heuristic::NodeData, typename Heuristic::EdgeData > | HSIT |
| typedef HSIT::SolverGraph | SolverGraph |
| typedef HSIT::NodeData | NodeData |
| typedef HSIT::EdgeData | EdgeData |
| typedef HSIT::GraphNodeIterator | GraphNodeIterator |
| typedef HSIT::GraphEdgeIterator | GraphEdgeIterator |
| typedef HSIT::GraphAdjEdgeIterator | GraphAdjEdgeIterator |
| typedef HSIT::NodeList | NodeList |
| typedef HSIT::NodeListIterator | NodeListIterator |
| typedef std::vector < GraphNodeIterator > | NodeStack |
| typedef NodeStack::iterator | NodeStackIterator |
Public Member Functions | |
| HeuristicSolverImpl (const SimpleGraph &orig) | |
| Constructor, which performs all the actual solver work. | |
| SolverGraph & | getGraph () |
| Returns the graph for this solver. | |
| const Solution & | getSolution () const |
| Return the solution found by this solver. | |
| void | addLink (const GraphEdgeIterator &edgeItr) |
| Add a link. | |
| void | removeLink (const GraphEdgeIterator &edgeItr, const GraphNodeIterator &nodeItr) |
| Remove link, update info for node. | |
| void | removeLinkR2 (const GraphEdgeIterator &edgeItr) |
| Remove link, update info for both nodes. Useful for R2 only. | |
| void | unlinkNode (const GraphNodeIterator &nodeItr) |
| Removes all links connected to the given node. | |
| void | pushStack (const GraphNodeIterator &nodeItr) |
| Push the given node onto the stack to be solved with backpropagation. | |
| void | setSolution (const GraphNodeIterator &nodeItr, unsigned solIndex) |
| Set the solution of the given node. | |
Definition at line 152 of file HeuristicSolver.h.
| typedef HSITypes<typename Heuristic::NodeData, typename Heuristic::EdgeData> PBQP::HeuristicSolverImpl< Heuristic >::HSIT |
Definition at line 156 of file HeuristicSolver.h.
| typedef HSIT::SolverGraph PBQP::HeuristicSolverImpl< Heuristic >::SolverGraph |
Definition at line 157 of file HeuristicSolver.h.
| typedef HSIT::NodeData PBQP::HeuristicSolverImpl< Heuristic >::NodeData |
Definition at line 158 of file HeuristicSolver.h.
| typedef HSIT::EdgeData PBQP::HeuristicSolverImpl< Heuristic >::EdgeData |
Definition at line 159 of file HeuristicSolver.h.
| typedef HSIT::GraphNodeIterator PBQP::HeuristicSolverImpl< Heuristic >::GraphNodeIterator |
Definition at line 160 of file HeuristicSolver.h.
| typedef HSIT::GraphEdgeIterator PBQP::HeuristicSolverImpl< Heuristic >::GraphEdgeIterator |
Definition at line 161 of file HeuristicSolver.h.
| typedef HSIT::GraphAdjEdgeIterator PBQP::HeuristicSolverImpl< Heuristic >::GraphAdjEdgeIterator |
Definition at line 162 of file HeuristicSolver.h.
| typedef HSIT::NodeList PBQP::HeuristicSolverImpl< Heuristic >::NodeList |
Definition at line 164 of file HeuristicSolver.h.
| typedef HSIT::NodeListIterator PBQP::HeuristicSolverImpl< Heuristic >::NodeListIterator |
Definition at line 165 of file HeuristicSolver.h.
| typedef std::vector<GraphNodeIterator> PBQP::HeuristicSolverImpl< Heuristic >::NodeStack |
Definition at line 167 of file HeuristicSolver.h.
| typedef NodeStack::iterator PBQP::HeuristicSolverImpl< Heuristic >::NodeStackIterator |
Definition at line 168 of file HeuristicSolver.h.
| PBQP::HeuristicSolverImpl< Heuristic >::HeuristicSolverImpl | ( | const SimpleGraph & | orig | ) | [inline] |
Constructor, which performs all the actual solver work.
Definition at line 171 of file HeuristicSolver.h.
| SolverGraph& PBQP::HeuristicSolverImpl< Heuristic >::getGraph | ( | ) | [inline] |
Returns the graph for this solver.
Definition at line 182 of file HeuristicSolver.h.
Referenced by PBQP::Heuristics::Briggs::initialise().
| const Solution& PBQP::HeuristicSolverImpl< Heuristic >::getSolution | ( | ) | const [inline] |
Return the solution found by this solver.
Definition at line 185 of file HeuristicSolver.h.
Referenced by PBQP::HeuristicSolver< Heuristic >::solve().
| void PBQP::HeuristicSolverImpl< Heuristic >::addLink | ( | const GraphEdgeIterator & | edgeItr | ) | [inline] |
Add a link.
Definition at line 225 of file HeuristicSolver.h.
References PBQP::AnnotatedGraph< NodeData, EdgeData >::getEdgeData(), PBQP::GraphBase< NodeEntry, EdgeEntry >::getEdgeNode1Itr(), PBQP::GraphBase< NodeEntry, EdgeEntry >::getEdgeNode2Itr(), PBQP::AnnotatedGraph< NodeData, EdgeData >::getNodeData(), and PBQP::HSITypes< HeuristicNodeData, HeuristicEdgeData >::EdgeData::setup().
| void PBQP::HeuristicSolverImpl< Heuristic >::removeLink | ( | const GraphEdgeIterator & | edgeItr, | |
| const GraphNodeIterator & | nodeItr | |||
| ) | [inline] |
Remove link, update info for node.
Only updates information for the given node, since usually the other is about to be removed.
Definition at line 238 of file HeuristicSolver.h.
References PBQP::AnnotatedGraph< NodeData, EdgeData >::getEdgeData(), PBQP::HSITypes< HeuristicNodeData, HeuristicEdgeData >::NodeData::getLinkDegree(), PBQP::AnnotatedGraph< NodeData, EdgeData >::getNodeData(), and PBQP::HSITypes< HeuristicNodeData, HeuristicEdgeData >::EdgeData::unlink().
Referenced by PBQP::HeuristicSolverImpl< Heuristic >::removeLinkR2(), and PBQP::HeuristicSolverImpl< Heuristic >::unlinkNode().
| void PBQP::HeuristicSolverImpl< Heuristic >::removeLinkR2 | ( | const GraphEdgeIterator & | edgeItr | ) | [inline] |
Remove link, update info for both nodes. Useful for R2 only.
Definition at line 248 of file HeuristicSolver.h.
References PBQP::GraphBase< NodeEntry, EdgeEntry >::getEdgeNode1Itr(), PBQP::GraphBase< NodeEntry, EdgeEntry >::getEdgeNode2Itr(), PBQP::HSITypes< HeuristicNodeData, HeuristicEdgeData >::NodeData::getLinkDegree(), PBQP::AnnotatedGraph< NodeData, EdgeData >::getNodeData(), and PBQP::HeuristicSolverImpl< Heuristic >::removeLink().
| void PBQP::HeuristicSolverImpl< Heuristic >::unlinkNode | ( | const GraphNodeIterator & | nodeItr | ) | [inline] |
Removes all links connected to the given node.
Definition at line 258 of file HeuristicSolver.h.
References PBQP::HSITypes< HeuristicNodeData, HeuristicEdgeData >::NodeData::adjLinksBegin(), PBQP::HSITypes< HeuristicNodeData, HeuristicEdgeData >::NodeData::adjLinksEnd(), PBQP::GraphBase< NodeEntry, EdgeEntry >::getEdgeOtherNode(), PBQP::HSITypes< HeuristicNodeData, HeuristicEdgeData >::NodeData::getLinkDegree(), PBQP::AnnotatedGraph< NodeData, EdgeData >::getNodeData(), and PBQP::HeuristicSolverImpl< Heuristic >::removeLink().
Referenced by PBQP::Heuristics::Briggs::processRN().
| void PBQP::HeuristicSolverImpl< Heuristic >::pushStack | ( | const GraphNodeIterator & | nodeItr | ) | [inline] |
Push the given node onto the stack to be solved with backpropagation.
Definition at line 285 of file HeuristicSolver.h.
Referenced by PBQP::Heuristics::Briggs::processRN().
| void PBQP::HeuristicSolverImpl< Heuristic >::setSolution | ( | const GraphNodeIterator & | nodeItr, | |
| unsigned | solIndex | |||
| ) | [inline] |
Set the solution of the given node.
Definition at line 290 of file HeuristicSolver.h.
References PBQP::HSITypes< HeuristicNodeData, HeuristicEdgeData >::NodeData::addSolvedLink(), PBQP::GraphBase< NodeEntry, EdgeEntry >::adjEdgesBegin(), PBQP::GraphBase< NodeEntry, EdgeEntry >::adjEdgesEnd(), PBQP::GraphBase< NodeEntry, EdgeEntry >::getEdgeOtherNode(), PBQP::AnnotatedGraph< NodeData, EdgeData >::getNodeData(), PBQP::GraphBase< NodeEntry, EdgeEntry >::getNodeID(), and PBQP::Solution::setSelection().