diff --git a/src/qana/RelationGraph.cc b/src/qana/RelationGraph.cc index 0136b7c118..773a190b78 100644 --- a/src/qana/RelationGraph.cc +++ b/src/qana/RelationGraph.cc @@ -824,6 +824,26 @@ struct VertexQueue { } }; +/// dump graph +void dumpGraph(std::list const& vertices) { + if (LOG_CHECK_LVL(_log, LOG_LVL_TRACE)) { + LOGS(_log, LOG_LVL_TRACE, "RelationGraph:"); + std::map vtxId; + for (auto&& vtx : vertices) { + int id = vtxId.size(); + vtxId[&vtx] = id; + LOGS(_log, LOG_LVL_TRACE, + " vertex " << id << " info=" << *vtx.info << " overlap=" << vtx.overlap); + } + for (auto&& vtx : vertices) { + for (auto&& edge : vtx.edges) { + LOGS(_log, LOG_LVL_TRACE, + " edge " << vtxId[&vtx] << " <-> " << vtxId[edge.vertex] << " angSep=" << edge.angSep); + } + } + } +} + /// `computeMinimumOverlap` visits every vertex linked to `v` via one or more /// paths and computes its minimum required overlap. void computeMinimumOverlap(Vertex& vtx) { @@ -888,26 +908,6 @@ void computeMinimumOverlap(Vertex& vtx) { } } -/// dump graph -void dumpGraph(std::list const& vertices) { - if (LOG_CHECK_LVL(_log, LOG_LVL_TRACE)) { - LOGS(_log, LOG_LVL_TRACE, "RelationGraph:"); - std::map vtxId; - for (auto&& vtx : vertices) { - int id = vtxId.size(); - vtxId[&vtx] = id; - LOGS(_log, LOG_LVL_TRACE, - " vertex " << id << " info=" << *vtx.info << " overlap=" << vtx.overlap); - } - for (auto&& vtx : vertices) { - for (auto&& edge : vtx.edges) { - LOGS(_log, LOG_LVL_TRACE, - " edge " << vtxId[&vtx] << " <-> " << vtxId[edge.vertex] << " angSep=" << edge.angSep); - } - } - } -} - /// `isEvaluable` returns `true` if no graph vertex requires infinite overlap. bool isEvaluable(std::list const& vertices) { LOGS(_log, LOG_LVL_TRACE, __FUNCTION__);