| 118 | } |
| 119 | |
| 120 | void cmComputeComponentGraph::TransferEdges() |
| 121 | { |
| 122 | // Map inter-component edges in the original graph to edges in the |
| 123 | // component graph. |
| 124 | size_t n = this->InputGraph.size(); |
| 125 | for (size_t i = 0; i < n; ++i) { |
| 126 | size_t i_component = this->TarjanComponents[i]; |
| 127 | EdgeList const& nl = this->InputGraph[i]; |
| 128 | for (cmGraphEdge const& ni : nl) { |
| 129 | size_t j = ni; |
| 130 | size_t j_component = this->TarjanComponents[j]; |
| 131 | if (i_component != j_component) { |
| 132 | // We do not attempt to combine duplicate edges, but instead |
| 133 | // store the inter-component edges with suitable multiplicity. |
| 134 | this->ComponentGraph[i_component].emplace_back( |
| 135 | j_component, ni.IsStrong(), ni.IsCross(), ni.GetBacktrace()); |
| 136 | } |
| 137 | } |
| 138 | } |
| 139 | } |
no test coverage detected