summaryrefslogtreecommitdiff
path: root/Source/cmComputeComponentGraph.h
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2020-07-28 15:30:56 -0400
committerKyle Edwards <kyle.edwards@kitware.com>2020-07-28 15:30:56 -0400
commitbd0d03386b0f02aa34da5438d8f78575cf2642e7 (patch)
tree31cf890670f8121a5668a2b65516ba3ec220f660 /Source/cmComputeComponentGraph.h
parent7788494257e0a1a22468b5542f9d8c5cb8c3dfed (diff)
downloadcmake-bd0d03386b0f02aa34da5438d8f78575cf2642e7.tar.gz
cmComputeComponentGraph: Move work out of constructor into Compute() method
The computation of Tarjan's algorithm is an expensive operation which should not be done in the constructor. Move this work into a dedicated Compute() method, and call this method explicitly.
Diffstat (limited to 'Source/cmComputeComponentGraph.h')
-rw-r--r--Source/cmComputeComponentGraph.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmComputeComponentGraph.h b/Source/cmComputeComponentGraph.h
index 202888cf9c..b873131574 100644
--- a/Source/cmComputeComponentGraph.h
+++ b/Source/cmComputeComponentGraph.h
@@ -31,6 +31,9 @@ public:
cmComputeComponentGraph(Graph const& input);
~cmComputeComponentGraph();
+ /** Run the computation. */
+ void Compute();
+
/** Get the adjacency list of the component graph. */
Graph const& GetComponentGraph() const { return this->ComponentGraph; }
EdgeList const& GetComponentGraphEdges(int c) const