mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-10 02:25:47 +00:00
[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
This commit is contained in:
@@ -28,6 +28,16 @@ namespace PBQP {
|
|||||||
public:
|
public:
|
||||||
typedef unsigned NodeId;
|
typedef unsigned NodeId;
|
||||||
typedef unsigned EdgeId;
|
typedef unsigned EdgeId;
|
||||||
|
|
||||||
|
/// \brief Returns a value representing an invalid (non-existant) node.
|
||||||
|
static NodeId invalidNodeId() {
|
||||||
|
return std::numeric_limits<NodeId>::max();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// \brief Returns a value representing an invalid (non-existant) edge.
|
||||||
|
static EdgeId invalidEdgeId() {
|
||||||
|
return std::numeric_limits<EdgeId>::max();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/// PBQP Graph class.
|
/// PBQP Graph class.
|
||||||
@@ -466,16 +476,6 @@ namespace PBQP {
|
|||||||
return E.getN1Id();
|
return E.getN1Id();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \brief Returns a value representing an invalid (non-existant) node.
|
|
||||||
static NodeId invalidNodeId() {
|
|
||||||
return std::numeric_limits<NodeId>::max();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// \brief Returns a value representing an invalid (non-existant) edge.
|
|
||||||
static EdgeId invalidEdgeId() {
|
|
||||||
return std::numeric_limits<EdgeId>::max();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// \brief Get the edge connecting two nodes.
|
/// \brief Get the edge connecting two nodes.
|
||||||
/// @param N1Id First node id.
|
/// @param N1Id First node id.
|
||||||
/// @param N2Id Second node id.
|
/// @param N2Id Second node id.
|
||||||
|
Reference in New Issue
Block a user