MCPcopy Create free account
hub / github.com/Kitware/CMake / TransferEdges

Method TransferEdges

Source/cmComputeComponentGraph.cxx:120–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120void 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}

Callers 1

ComputeMethod · 0.95

Calls 5

emplace_backMethod · 0.80
IsStrongMethod · 0.80
sizeMethod · 0.45
IsCrossMethod · 0.45
GetBacktraceMethod · 0.45

Tested by

no test coverage detected