415 lines
23 KiB
HTML
415 lines
23 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
<head>
|
||
<title>OR-Tools</title>
|
||
<meta http-equiv="Content-Type" content="text/html;"/>
|
||
<meta charset="utf-8"/>
|
||
<!--<link rel='stylesheet' type='text/css' href="https://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic"/>-->
|
||
<link rel="stylesheet" type="text/css" href="ortools.css" title="default" media="screen,print" />
|
||
<script type="text/javascript" src="jquery.js"></script>
|
||
<script type="text/javascript" src="dynsections.js"></script>
|
||
</head>
|
||
<body>
|
||
<div id="banner-container">
|
||
<div id="banner">
|
||
<span id="sfml">OR-Tools 7.2</span>
|
||
</div>
|
||
</div>
|
||
<link rel="icon" href="https://developers.google.com/optimization/images/orLogo.png">
|
||
<div id="content">
|
||
<!-- Generated by Doxygen 1.8.15 -->
|
||
<div id="navrow1" class="tabs">
|
||
<ul class="tablist">
|
||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||
<li><a href="pages.html"><span>Related Pages</span></a></li>
|
||
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
||
<li><a href="files.html"><span>Files</span></a></li>
|
||
</ul>
|
||
</div>
|
||
<div id="navrow2" class="tabs2">
|
||
<ul class="tablist">
|
||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||
<li><a href="classes.html"><span>Class Index</span></a></li>
|
||
<li><a href="inherits.html"><span>Class Hierarchy</span></a></li>
|
||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||
</ul>
|
||
</div>
|
||
<div id="nav-path" class="navpath">
|
||
<ul>
|
||
<li class="navelem"><a class="el" href="namespaceoperations__research.html">operations_research</a></li><li class="navelem"><a class="el" href="classoperations__research_1_1MergingPartition.html">MergingPartition</a></li> </ul>
|
||
</div>
|
||
</div><!-- top -->
|
||
<div class="header">
|
||
<div class="summary">
|
||
<a href="#pub-methods">Public Member Functions</a> |
|
||
<a href="classoperations__research_1_1MergingPartition-members.html">List of all members</a> </div>
|
||
<div class="headertitle">
|
||
<div class="title">operations_research::MergingPartition Class Reference</div> </div>
|
||
</div><!--header-->
|
||
<div class="contents">
|
||
|
||
<p>Partition class that supports incremental merging, using the union-find algorithm (see <a href="http://en.wikipedia.org/wiki/Disjoint-set_data_structure">http://en.wikipedia.org/wiki/Disjoint-set_data_structure</a>).
|
||
<a href="classoperations__research_1_1MergingPartition.html#details">More...</a></p>
|
||
|
||
<p><code>#include <<a class="el" href="dynamic__partition_8h_source.html">dynamic_partition.h</a>></code></p>
|
||
<table class="memberdecls">
|
||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
|
||
Public Member Functions</h2></td></tr>
|
||
<tr class="memitem:a561892525aa4b6891d5f7636f62cd749"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoperations__research_1_1MergingPartition.html#a561892525aa4b6891d5f7636f62cd749">MergingPartition</a> ()</td></tr>
|
||
<tr class="memdesc:a561892525aa4b6891d5f7636f62cd749"><td class="mdescLeft"> </td><td class="mdescRight">At first, all nodes are in their own singleton part. <a href="#a561892525aa4b6891d5f7636f62cd749">More...</a><br /></td></tr>
|
||
<tr class="separator:a561892525aa4b6891d5f7636f62cd749"><td class="memSeparator" colspan="2"> </td></tr>
|
||
<tr class="memitem:a2dddfdd1d086883ce9a1306acf647f30"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoperations__research_1_1MergingPartition.html#a2dddfdd1d086883ce9a1306acf647f30">MergingPartition</a> (int num_nodes)</td></tr>
|
||
<tr class="separator:a2dddfdd1d086883ce9a1306acf647f30"><td class="memSeparator" colspan="2"> </td></tr>
|
||
<tr class="memitem:a2acc4c8e2883189a896862486d160438"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classoperations__research_1_1MergingPartition.html#a2acc4c8e2883189a896862486d160438">Reset</a> (int num_nodes)</td></tr>
|
||
<tr class="separator:a2acc4c8e2883189a896862486d160438"><td class="memSeparator" colspan="2"> </td></tr>
|
||
<tr class="memitem:a8e5d14e6155d2a01fe50fc088ee55f3f"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classoperations__research_1_1MergingPartition.html#a8e5d14e6155d2a01fe50fc088ee55f3f">NumNodes</a> () const</td></tr>
|
||
<tr class="separator:a8e5d14e6155d2a01fe50fc088ee55f3f"><td class="memSeparator" colspan="2"> </td></tr>
|
||
<tr class="memitem:a189669a00c0a94f224db9005c8925310"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classoperations__research_1_1MergingPartition.html#a189669a00c0a94f224db9005c8925310">MergePartsOf</a> (int node1, int node2)</td></tr>
|
||
<tr class="memdesc:a189669a00c0a94f224db9005c8925310"><td class="mdescLeft"> </td><td class="mdescRight">Complexity: amortized O(Ackermann⁻¹(N)) – which is essentially O(1) – where N is the number of nodes. <a href="#a189669a00c0a94f224db9005c8925310">More...</a><br /></td></tr>
|
||
<tr class="separator:a189669a00c0a94f224db9005c8925310"><td class="memSeparator" colspan="2"> </td></tr>
|
||
<tr class="memitem:ab5aff2ca8ee76377b90e75f369a06965"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classoperations__research_1_1MergingPartition.html#ab5aff2ca8ee76377b90e75f369a06965">GetRootAndCompressPath</a> (int node)</td></tr>
|
||
<tr class="memdesc:ab5aff2ca8ee76377b90e75f369a06965"><td class="mdescLeft"> </td><td class="mdescRight">Get the representative of "node" (a node in the same equivalence class, which will also be returned for any other "node" in the same class). <a href="#ab5aff2ca8ee76377b90e75f369a06965">More...</a><br /></td></tr>
|
||
<tr class="separator:ab5aff2ca8ee76377b90e75f369a06965"><td class="memSeparator" colspan="2"> </td></tr>
|
||
<tr class="memitem:a09305f65b966f5d00cdb7c5e3fcec43a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classoperations__research_1_1MergingPartition.html#a09305f65b966f5d00cdb7c5e3fcec43a">KeepOnlyOneNodePerPart</a> (std::vector< int > *nodes)</td></tr>
|
||
<tr class="memdesc:a09305f65b966f5d00cdb7c5e3fcec43a"><td class="mdescLeft"> </td><td class="mdescRight">Specialized reader API: prunes "nodes" to only keep at most one node per part: any node which is in the same part as an earlier node will be pruned. <a href="#a09305f65b966f5d00cdb7c5e3fcec43a">More...</a><br /></td></tr>
|
||
<tr class="separator:a09305f65b966f5d00cdb7c5e3fcec43a"><td class="memSeparator" colspan="2"> </td></tr>
|
||
<tr class="memitem:a450228c4fe64624a5c075a462ff91290"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classoperations__research_1_1MergingPartition.html#a450228c4fe64624a5c075a462ff91290">FillEquivalenceClasses</a> (std::vector< int > *node_equivalence_classes)</td></tr>
|
||
<tr class="memdesc:a450228c4fe64624a5c075a462ff91290"><td class="mdescLeft"> </td><td class="mdescRight">Output the whole partition as node equivalence classes: if there are K parts and N nodes, node_equivalence_classes[i] will contain the part index (a number in 0..K-1) of node #i. <a href="#a450228c4fe64624a5c075a462ff91290">More...</a><br /></td></tr>
|
||
<tr class="separator:a450228c4fe64624a5c075a462ff91290"><td class="memSeparator" colspan="2"> </td></tr>
|
||
<tr class="memitem:a62fb42554b2c7db5121b5b4230188d9d"><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classoperations__research_1_1MergingPartition.html#a62fb42554b2c7db5121b5b4230188d9d">DebugString</a> ()</td></tr>
|
||
<tr class="memdesc:a62fb42554b2c7db5121b5b4230188d9d"><td class="mdescLeft"> </td><td class="mdescRight">Dump all components, with nodes sorted within each part and parts sorted lexicographically. <a href="#a62fb42554b2c7db5121b5b4230188d9d">More...</a><br /></td></tr>
|
||
<tr class="separator:a62fb42554b2c7db5121b5b4230188d9d"><td class="memSeparator" colspan="2"> </td></tr>
|
||
<tr class="memitem:a955ac764e9c8dcd4358202de4ecd47fd"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classoperations__research_1_1MergingPartition.html#a955ac764e9c8dcd4358202de4ecd47fd">ResetNode</a> (int node)</td></tr>
|
||
<tr class="memdesc:a955ac764e9c8dcd4358202de4ecd47fd"><td class="mdescLeft"> </td><td class="mdescRight">Advanced usage: sets 'node' to be in its original singleton. <a href="#a955ac764e9c8dcd4358202de4ecd47fd">More...</a><br /></td></tr>
|
||
<tr class="separator:a955ac764e9c8dcd4358202de4ecd47fd"><td class="memSeparator" colspan="2"> </td></tr>
|
||
<tr class="memitem:a154e7e5b242aa754c41d709d3bc351c1"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classoperations__research_1_1MergingPartition.html#a154e7e5b242aa754c41d709d3bc351c1">NumNodesInSamePartAs</a> (int node)</td></tr>
|
||
<tr class="separator:a154e7e5b242aa754c41d709d3bc351c1"><td class="memSeparator" colspan="2"> </td></tr>
|
||
<tr class="memitem:a57d8288fbe286978c65abf82bd051000"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classoperations__research_1_1MergingPartition.html#a57d8288fbe286978c65abf82bd051000">GetRoot</a> (int node) const</td></tr>
|
||
<tr class="memdesc:a57d8288fbe286978c65abf82bd051000"><td class="mdescLeft"> </td><td class="mdescRight">FOR DEBUGGING OR SPECIAL "CONST" ACCESS ONLY: Find the root of the union-find tree with leaf 'node', i.e. <a href="#a57d8288fbe286978c65abf82bd051000">More...</a><br /></td></tr>
|
||
<tr class="separator:a57d8288fbe286978c65abf82bd051000"><td class="memSeparator" colspan="2"> </td></tr>
|
||
</table>
|
||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||
<div class="textblock"><p>Partition class that supports incremental merging, using the union-find algorithm (see <a href="http://en.wikipedia.org/wiki/Disjoint-set_data_structure">http://en.wikipedia.org/wiki/Disjoint-set_data_structure</a>). </p>
|
||
|
||
<p class="definition">Definition at line <a class="el" href="dynamic__partition_8h_source.html#l00203">203</a> of file <a class="el" href="dynamic__partition_8h_source.html">dynamic_partition.h</a>.</p>
|
||
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
||
<a id="a561892525aa4b6891d5f7636f62cd749"></a>
|
||
<h2 class="memtitle"><span class="permalink"><a href="#a561892525aa4b6891d5f7636f62cd749">◆ </a></span>MergingPartition() <span class="overload">[1/2]</span></h2>
|
||
|
||
<div class="memitem">
|
||
<div class="memproto">
|
||
<table class="mlabels">
|
||
<tr>
|
||
<td class="mlabels-left">
|
||
<table class="memname">
|
||
<tr>
|
||
<td class="memname">operations_research::MergingPartition::MergingPartition </td>
|
||
<td>(</td>
|
||
<td class="paramname"></td><td>)</td>
|
||
<td></td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
<td class="mlabels-right">
|
||
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
||
</tr>
|
||
</table>
|
||
</div><div class="memdoc">
|
||
|
||
<p>At first, all nodes are in their own singleton part. </p>
|
||
|
||
<p class="definition">Definition at line <a class="el" href="dynamic__partition_8h_source.html#l00206">206</a> of file <a class="el" href="dynamic__partition_8h_source.html">dynamic_partition.h</a>.</p>
|
||
|
||
</div>
|
||
</div>
|
||
<a id="a2dddfdd1d086883ce9a1306acf647f30"></a>
|
||
<h2 class="memtitle"><span class="permalink"><a href="#a2dddfdd1d086883ce9a1306acf647f30">◆ </a></span>MergingPartition() <span class="overload">[2/2]</span></h2>
|
||
|
||
<div class="memitem">
|
||
<div class="memproto">
|
||
<table class="mlabels">
|
||
<tr>
|
||
<td class="mlabels-left">
|
||
<table class="memname">
|
||
<tr>
|
||
<td class="memname">operations_research::MergingPartition::MergingPartition </td>
|
||
<td>(</td>
|
||
<td class="paramtype">int </td>
|
||
<td class="paramname"><em>num_nodes</em></td><td>)</td>
|
||
<td></td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
<td class="mlabels-right">
|
||
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span> </td>
|
||
</tr>
|
||
</table>
|
||
</div><div class="memdoc">
|
||
|
||
<p class="definition">Definition at line <a class="el" href="dynamic__partition_8h_source.html#l00207">207</a> of file <a class="el" href="dynamic__partition_8h_source.html">dynamic_partition.h</a>.</p>
|
||
|
||
</div>
|
||
</div>
|
||
<h2 class="groupheader">Member Function Documentation</h2>
|
||
<a id="a62fb42554b2c7db5121b5b4230188d9d"></a>
|
||
<h2 class="memtitle"><span class="permalink"><a href="#a62fb42554b2c7db5121b5b4230188d9d">◆ </a></span>DebugString()</h2>
|
||
|
||
<div class="memitem">
|
||
<div class="memproto">
|
||
<table class="memname">
|
||
<tr>
|
||
<td class="memname">std::string operations_research::MergingPartition::DebugString </td>
|
||
<td>(</td>
|
||
<td class="paramname"></td><td>)</td>
|
||
<td></td>
|
||
</tr>
|
||
</table>
|
||
</div><div class="memdoc">
|
||
|
||
<p>Dump all components, with nodes sorted within each part and parts sorted lexicographically. </p>
|
||
<p>Eg. "0 1 3 4 | 2 5 | 6 7 8". </p>
|
||
|
||
</div>
|
||
</div>
|
||
<a id="a450228c4fe64624a5c075a462ff91290"></a>
|
||
<h2 class="memtitle"><span class="permalink"><a href="#a450228c4fe64624a5c075a462ff91290">◆ </a></span>FillEquivalenceClasses()</h2>
|
||
|
||
<div class="memitem">
|
||
<div class="memproto">
|
||
<table class="memname">
|
||
<tr>
|
||
<td class="memname">int operations_research::MergingPartition::FillEquivalenceClasses </td>
|
||
<td>(</td>
|
||
<td class="paramtype">std::vector< int > * </td>
|
||
<td class="paramname"><em>node_equivalence_classes</em></td><td>)</td>
|
||
<td></td>
|
||
</tr>
|
||
</table>
|
||
</div><div class="memdoc">
|
||
|
||
<p>Output the whole partition as node equivalence classes: if there are K parts and N nodes, node_equivalence_classes[i] will contain the part index (a number in 0..K-1) of node #i. </p>
|
||
<p>Parts will be sorted by their first node (i.e. node 0 will always be in part 0; then the next node that isn't in part 0 will be in part 1, and so on). Returns the number K of classes. </p>
|
||
|
||
</div>
|
||
</div>
|
||
<a id="a57d8288fbe286978c65abf82bd051000"></a>
|
||
<h2 class="memtitle"><span class="permalink"><a href="#a57d8288fbe286978c65abf82bd051000">◆ </a></span>GetRoot()</h2>
|
||
|
||
<div class="memitem">
|
||
<div class="memproto">
|
||
<table class="mlabels">
|
||
<tr>
|
||
<td class="mlabels-left">
|
||
<table class="memname">
|
||
<tr>
|
||
<td class="memname">int operations_research::MergingPartition::GetRoot </td>
|
||
<td>(</td>
|
||
<td class="paramtype">int </td>
|
||
<td class="paramname"><em>node</em></td><td>)</td>
|
||
<td> const</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
<td class="mlabels-right">
|
||
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
||
</tr>
|
||
</table>
|
||
</div><div class="memdoc">
|
||
|
||
<p>FOR DEBUGGING OR SPECIAL "CONST" ACCESS ONLY: Find the root of the union-find tree with leaf 'node', i.e. </p>
|
||
<p>its representative node, but don't use path compression. The amortized complexity can be as bad as log(N), as opposed to the version using path compression. </p>
|
||
|
||
<p class="definition">Definition at line <a class="el" href="dynamic__partition_8h_source.html#l00314">314</a> of file <a class="el" href="dynamic__partition_8h_source.html">dynamic_partition.h</a>.</p>
|
||
|
||
</div>
|
||
</div>
|
||
<a id="ab5aff2ca8ee76377b90e75f369a06965"></a>
|
||
<h2 class="memtitle"><span class="permalink"><a href="#ab5aff2ca8ee76377b90e75f369a06965">◆ </a></span>GetRootAndCompressPath()</h2>
|
||
|
||
<div class="memitem">
|
||
<div class="memproto">
|
||
<table class="memname">
|
||
<tr>
|
||
<td class="memname">int operations_research::MergingPartition::GetRootAndCompressPath </td>
|
||
<td>(</td>
|
||
<td class="paramtype">int </td>
|
||
<td class="paramname"><em>node</em></td><td>)</td>
|
||
<td></td>
|
||
</tr>
|
||
</table>
|
||
</div><div class="memdoc">
|
||
|
||
<p>Get the representative of "node" (a node in the same equivalence class, which will also be returned for any other "node" in the same class). </p>
|
||
<p>The complexity if the same as <a class="el" href="classoperations__research_1_1MergingPartition.html#a189669a00c0a94f224db9005c8925310" title="Complexity: amortized O(Ackermann⁻¹(N)) – which is essentially O(1) – where N is the number of nodes.">MergePartsOf()</a>. </p>
|
||
|
||
</div>
|
||
</div>
|
||
<a id="a09305f65b966f5d00cdb7c5e3fcec43a"></a>
|
||
<h2 class="memtitle"><span class="permalink"><a href="#a09305f65b966f5d00cdb7c5e3fcec43a">◆ </a></span>KeepOnlyOneNodePerPart()</h2>
|
||
|
||
<div class="memitem">
|
||
<div class="memproto">
|
||
<table class="memname">
|
||
<tr>
|
||
<td class="memname">void operations_research::MergingPartition::KeepOnlyOneNodePerPart </td>
|
||
<td>(</td>
|
||
<td class="paramtype">std::vector< int > * </td>
|
||
<td class="paramname"><em>nodes</em></td><td>)</td>
|
||
<td></td>
|
||
</tr>
|
||
</table>
|
||
</div><div class="memdoc">
|
||
|
||
<p>Specialized reader API: prunes "nodes" to only keep at most one node per part: any node which is in the same part as an earlier node will be pruned. </p>
|
||
|
||
</div>
|
||
</div>
|
||
<a id="a189669a00c0a94f224db9005c8925310"></a>
|
||
<h2 class="memtitle"><span class="permalink"><a href="#a189669a00c0a94f224db9005c8925310">◆ </a></span>MergePartsOf()</h2>
|
||
|
||
<div class="memitem">
|
||
<div class="memproto">
|
||
<table class="memname">
|
||
<tr>
|
||
<td class="memname">int operations_research::MergingPartition::MergePartsOf </td>
|
||
<td>(</td>
|
||
<td class="paramtype">int </td>
|
||
<td class="paramname"><em>node1</em>, </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="paramkey"></td>
|
||
<td></td>
|
||
<td class="paramtype">int </td>
|
||
<td class="paramname"><em>node2</em> </td>
|
||
</tr>
|
||
<tr>
|
||
<td></td>
|
||
<td>)</td>
|
||
<td></td><td></td>
|
||
</tr>
|
||
</table>
|
||
</div><div class="memdoc">
|
||
|
||
<p>Complexity: amortized O(Ackermann⁻¹(N)) – which is essentially O(1) – where N is the number of nodes. </p>
|
||
<p>Return value: If this merge caused a representative node (of either node1 or node2) to stop being a representative (because only one can remain); this method returns that removed representative. Otherwise it returns -1.</p>
|
||
<p>Details: a smaller part will always be merged onto a larger one. Upons ties, the smaller representative becomes the overall representative. </p>
|
||
|
||
</div>
|
||
</div>
|
||
<a id="a8e5d14e6155d2a01fe50fc088ee55f3f"></a>
|
||
<h2 class="memtitle"><span class="permalink"><a href="#a8e5d14e6155d2a01fe50fc088ee55f3f">◆ </a></span>NumNodes()</h2>
|
||
|
||
<div class="memitem">
|
||
<div class="memproto">
|
||
<table class="mlabels">
|
||
<tr>
|
||
<td class="mlabels-left">
|
||
<table class="memname">
|
||
<tr>
|
||
<td class="memname">int operations_research::MergingPartition::NumNodes </td>
|
||
<td>(</td>
|
||
<td class="paramname"></td><td>)</td>
|
||
<td> const</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
<td class="mlabels-right">
|
||
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
||
</tr>
|
||
</table>
|
||
</div><div class="memdoc">
|
||
|
||
<p class="definition">Definition at line <a class="el" href="dynamic__partition_8h_source.html#l00210">210</a> of file <a class="el" href="dynamic__partition_8h_source.html">dynamic_partition.h</a>.</p>
|
||
|
||
</div>
|
||
</div>
|
||
<a id="a154e7e5b242aa754c41d709d3bc351c1"></a>
|
||
<h2 class="memtitle"><span class="permalink"><a href="#a154e7e5b242aa754c41d709d3bc351c1">◆ </a></span>NumNodesInSamePartAs()</h2>
|
||
|
||
<div class="memitem">
|
||
<div class="memproto">
|
||
<table class="mlabels">
|
||
<tr>
|
||
<td class="mlabels-left">
|
||
<table class="memname">
|
||
<tr>
|
||
<td class="memname">int operations_research::MergingPartition::NumNodesInSamePartAs </td>
|
||
<td>(</td>
|
||
<td class="paramtype">int </td>
|
||
<td class="paramname"><em>node</em></td><td>)</td>
|
||
<td></td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
<td class="mlabels-right">
|
||
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
||
</tr>
|
||
</table>
|
||
</div><div class="memdoc">
|
||
|
||
<p class="definition">Definition at line <a class="el" href="dynamic__partition_8h_source.html#l00251">251</a> of file <a class="el" href="dynamic__partition_8h_source.html">dynamic_partition.h</a>.</p>
|
||
|
||
</div>
|
||
</div>
|
||
<a id="a2acc4c8e2883189a896862486d160438"></a>
|
||
<h2 class="memtitle"><span class="permalink"><a href="#a2acc4c8e2883189a896862486d160438">◆ </a></span>Reset()</h2>
|
||
|
||
<div class="memitem">
|
||
<div class="memproto">
|
||
<table class="memname">
|
||
<tr>
|
||
<td class="memname">void operations_research::MergingPartition::Reset </td>
|
||
<td>(</td>
|
||
<td class="paramtype">int </td>
|
||
<td class="paramname"><em>num_nodes</em></td><td>)</td>
|
||
<td></td>
|
||
</tr>
|
||
</table>
|
||
</div><div class="memdoc">
|
||
|
||
</div>
|
||
</div>
|
||
<a id="a955ac764e9c8dcd4358202de4ecd47fd"></a>
|
||
<h2 class="memtitle"><span class="permalink"><a href="#a955ac764e9c8dcd4358202de4ecd47fd">◆ </a></span>ResetNode()</h2>
|
||
|
||
<div class="memitem">
|
||
<div class="memproto">
|
||
<table class="mlabels">
|
||
<tr>
|
||
<td class="mlabels-left">
|
||
<table class="memname">
|
||
<tr>
|
||
<td class="memname">void operations_research::MergingPartition::ResetNode </td>
|
||
<td>(</td>
|
||
<td class="paramtype">int </td>
|
||
<td class="paramname"><em>node</em></td><td>)</td>
|
||
<td></td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
<td class="mlabels-right">
|
||
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
||
</tr>
|
||
</table>
|
||
</div><div class="memdoc">
|
||
|
||
<p>Advanced usage: sets 'node' to be in its original singleton. </p>
|
||
<p>All nodes who may point to 'node' as a parent will remain in an inconsistent state. This can be used to reinitialize a <a class="el" href="classoperations__research_1_1MergingPartition.html" title="Partition class that supports incremental merging, using the union-find algorithm (see http://en....">MergingPartition</a> that has been sparsely modified in O(<code>modifications</code>). CRASHES IF USED INCORRECTLY. </p>
|
||
|
||
<p class="definition">Definition at line <a class="el" href="dynamic__partition_8h_source.html#l00339">339</a> of file <a class="el" href="dynamic__partition_8h_source.html">dynamic_partition.h</a>.</p>
|
||
|
||
</div>
|
||
</div>
|
||
<hr/>The documentation for this class was generated from the following file:<ul>
|
||
<li><a class="el" href="dynamic__partition_8h_source.html">dynamic_partition.h</a></li>
|
||
</ul>
|
||
</div><!-- contents -->
|
||
</div>
|
||
<div id="footer-container">
|
||
<div id="footer">
|
||
</div>
|
||
</div>
|
||
</body>
|
||
</html>
|