llvm.org GIT mirror llvm / b926af7
[PBQP] Move invalid graph nodeId/edgeId methods into base class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205122 91177308-0d34-0410-b5e6-96231b3b80d8 Lang Hames 6 years ago
1 changed file(s) with 10 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
2727 public:
2828 typedef unsigned NodeId;
2929 typedef unsigned EdgeId;
30
31 /// \brief Returns a value representing an invalid (non-existant) node.
32 static NodeId invalidNodeId() {
33 return std::numeric_limits::max();
34 }
35
36 /// \brief Returns a value representing an invalid (non-existant) edge.
37 static EdgeId invalidEdgeId() {
38 return std::numeric_limits::max();
39 }
3040 };
3141
3242 /// PBQP Graph class.
463473 return E.getN2Id();
464474 } // else
465475 return E.getN1Id();
466 }
467
468 /// \brief Returns a value representing an invalid (non-existant) node.
469 static NodeId invalidNodeId() {
470 return std::numeric_limits::max();
471 }
472
473 /// \brief Returns a value representing an invalid (non-existant) edge.
474 static EdgeId invalidEdgeId() {
475 return std::numeric_limits::max();
476476 }
477477
478478 /// \brief Get the edge connecting two nodes.