<ahref="dynamic__partition_8h.html">Go to the documentation of this file.</a><divclass="fragment"><divclass="line"><aname="l00001"></a><spanclass="lineno"> 1</span> <spanclass="comment">// Copyright 2010-2018 Google LLC</span></div>
<divclass="line"><aname="l00002"></a><spanclass="lineno"> 2</span> <spanclass="comment">// Licensed under the Apache License, Version 2.0 (the "License");</span></div>
<divclass="line"><aname="l00003"></a><spanclass="lineno"> 3</span> <spanclass="comment">// you may not use this file except in compliance with the License.</span></div>
<divclass="line"><aname="l00004"></a><spanclass="lineno"> 4</span> <spanclass="comment">// You may obtain a copy of the License at</span></div>
<divclass="line"><aname="l00008"></a><spanclass="lineno"> 8</span> <spanclass="comment">// Unless required by applicable law or agreed to in writing, software</span></div>
<divclass="line"><aname="l00009"></a><spanclass="lineno"> 9</span> <spanclass="comment">// distributed under the License is distributed on an "AS IS" BASIS,</span></div>
<divclass="line"><aname="l00010"></a><spanclass="lineno"> 10</span> <spanclass="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<divclass="line"><aname="l00011"></a><spanclass="lineno"> 11</span> <spanclass="comment">// See the License for the specific language governing permissions and</span></div>
<divclass="line"><aname="l00012"></a><spanclass="lineno"> 12</span> <spanclass="comment">// limitations under the License.</span></div>
<divclass="line"><aname="l00014"></a><spanclass="lineno"> 14</span> <spanclass="comment">// TODO(user,user): refine this toplevel comment when this file settles.</span></div>
<divclass="line"><aname="l00016"></a><spanclass="lineno"> 16</span> <spanclass="comment">// Two dynamic partition classes: one that incrementally splits a partition</span></div>
<divclass="line"><aname="l00017"></a><spanclass="lineno"> 17</span> <spanclass="comment">// into more and more parts; one that incrementally merges a partition into less</span></div>
<divclass="line"><aname="l00018"></a><spanclass="lineno"> 18</span> <spanclass="comment">// and less parts.</span></div>
<divclass="line"><aname="l00021"></a><spanclass="lineno"> 21</span> <spanclass="comment">// The partition classes maintain a partition of N integers 0..N-1</span></div>
<divclass="line"><aname="l00022"></a><spanclass="lineno"> 22</span> <spanclass="comment">// (aka "elements") into disjoint equivalence classes (aka "parts").</span></div>
<divclass="line"><aname="l00025"></a><spanclass="lineno"> 25</span> <spanclass="comment">// Like vector<int> crashes when used improperly, these classes are not "safe":</span></div>
<divclass="line"><aname="l00026"></a><spanclass="lineno"> 26</span> <spanclass="comment">// most of their methods may crash if called with invalid arguments. The client</span></div>
<divclass="line"><aname="l00027"></a><spanclass="lineno"> 27</span> <spanclass="comment">// code is responsible for using this class properly. A few DCHECKs() will help</span></div>
<divclass="line"><aname="l00040"></a><spanclass="lineno"> 40</span> <spanclass="comment">// Partition class that supports incremental splitting, with backtracking.</span></div>
<divclass="line"><aname="l00041"></a><spanclass="lineno"> 41</span> <spanclass="comment">// See http://en.wikipedia.org/wiki/Partition_refinement .</span></div>
<divclass="line"><aname="l00042"></a><spanclass="lineno"> 42</span> <spanclass="comment">// More precisely, the supported edit operations are:</span></div>
<divclass="line"><aname="l00043"></a><spanclass="lineno"> 43</span> <spanclass="comment">// - Refine the partition so that a subset S (typically, |S| <<< N)</span></div>
<divclass="line"><aname="l00044"></a><spanclass="lineno"> 44</span> <spanclass="comment">// of elements are all considered non-equivalent to any element in ¬S.</span></div>
<divclass="line"><aname="l00045"></a><spanclass="lineno"> 45</span> <spanclass="comment">// Typically, this should be done in O(|S|).</span></div>
<divclass="line"><aname="l00046"></a><spanclass="lineno"> 46</span> <spanclass="comment">// - Undo the above operations (backtracking).</span></div>
<divclass="line"><aname="l00048"></a><spanclass="lineno"> 48</span> <spanclass="comment">// TODO(user): rename this to BacktrackableSplittingPartition.</span></div>
<divclass="line"><aname="l00051"></a><spanclass="lineno"> 51</span> <spanclass="comment">// Creates a DynamicPartition on n elements, numbered 0..n-1. Start with</span></div>
<divclass="line"><aname="l00052"></a><spanclass="lineno"> 52</span> <spanclass="comment">// the trivial partition (only one subset containing all elements).</span></div>
<divclass="line"><aname="l00055"></a><spanclass="lineno"> 55</span> <spanclass="comment">// Ditto, but specify the initial part of each elements. Part indices must</span></div>
<divclass="line"><aname="l00056"></a><spanclass="lineno"> 56</span> <spanclass="comment">// form a dense integer set starting at 0; eg. [2, 1, 0, 1, 1, 3, 0] is valid.</span></div>
<divclass="line"><aname="l00063"></a><spanclass="lineno"> 63</span> <spanclass="comment">// To iterate over the elements in part #i:</span></div>
<divclass="line"><aname="l00064"></a><spanclass="lineno"> 64</span> <spanclass="comment">// for (int element : partition.ElementsInPart(i)) { ... }</span></div>
<divclass="line"><aname="l00066"></a><spanclass="lineno"> 66</span> <spanclass="comment">// ORDERING OF ELEMENTS INSIDE PARTS: the order of elements within a given</span></div>
<divclass="line"><aname="l00067"></a><spanclass="lineno"> 67</span> <spanclass="comment">// part is volatile, and may change with Refine() or UndoRefine*() operations,</span></div>
<divclass="line"><aname="l00068"></a><spanclass="lineno"> 68</span> <spanclass="comment">// even if the part itself doesn't change.</span></div>
<divclass="line"><aname="l00076"></a><spanclass="lineno"> 76</span> <spanclass="comment">// A handy shortcut to ElementsInPart(PartOf(e)). The returned IterablePart</span></div>
<divclass="line"><aname="l00077"></a><spanclass="lineno"> 77</span> <spanclass="comment">// will never be empty, since it contains at least i.</span></div>
<divclass="line"><aname="l00080"></a><spanclass="lineno"> 80</span> <spanclass="comment">// Returns a fingerprint of the given part. While collisions are possible,</span></div>
<divclass="line"><aname="l00081"></a><spanclass="lineno"> 81</span> <spanclass="comment">// their probability is quite low. Two parts that have the same size and the</span></div>
<divclass="line"><aname="l00082"></a><spanclass="lineno"> 82</span> <spanclass="comment">// same fingerprint are most likely identical.</span></div>
<divclass="line"><aname="l00083"></a><spanclass="lineno"> 83</span> <spanclass="comment">// Also, two parts that have the exact same set of elements will *always*</span></div>
<divclass="line"><aname="l00084"></a><spanclass="lineno"> 84</span> <spanclass="comment">// have the same fingerprint.</span></div>
<divclass="line"><aname="l00087"></a><spanclass="lineno"> 87</span> <spanclass="comment">// Refines the partition such that elements that are in distinguished_subset</span></div>
<divclass="line"><aname="l00088"></a><spanclass="lineno"> 88</span> <spanclass="comment">// never share the same part as elements that aren't in that subset.</span></div>
<divclass="line"><aname="l00089"></a><spanclass="lineno"> 89</span> <spanclass="comment">// This might be a no-op: in that case, NumParts() won't change, but the</span></div>
<divclass="line"><aname="l00090"></a><spanclass="lineno"> 90</span> <spanclass="comment">// order of elements inside each part may change.</span></div>
<divclass="line"><aname="l00092"></a><spanclass="lineno"> 92</span> <spanclass="comment">// ORDERING OF PARTS:</span></div>
<divclass="line"><aname="l00093"></a><spanclass="lineno"> 93</span> <spanclass="comment">// For each i such that Part #i has a non-trivial intersection with</span></div>
<divclass="line"><aname="l00094"></a><spanclass="lineno"> 94</span> <spanclass="comment">// "distinguished_subset" (neither empty, nor the full Part); Part #i is</span></div>
<divclass="line"><aname="l00095"></a><spanclass="lineno"> 95</span> <spanclass="comment">// stripped out of all elements that are in "distinguished_subset", and</span></div>
<divclass="line"><aname="l00096"></a><spanclass="lineno"> 96</span> <spanclass="comment">// those elements are sent to a newly created part, whose parent_part = i.</span></div>
<divclass="line"><aname="l00097"></a><spanclass="lineno"> 97</span> <spanclass="comment">// The parts newly created by a single Refine() operations are sorted</span></div>
<divclass="line"><aname="l00098"></a><spanclass="lineno"> 98</span> <spanclass="comment">// by parent_part.</span></div>
<divclass="line"><aname="l00099"></a><spanclass="lineno"> 99</span> <spanclass="comment">// Example: a Refine() on a partition with 6 parts causes parts #1, #3 and</span></div>
<divclass="line"><aname="l00100"></a><spanclass="lineno"> 100</span> <spanclass="comment">// #4 to be split: the partition will now contain 3 new parts: part #6 (with</span></div>
<divclass="line"><aname="l00101"></a><spanclass="lineno"> 101</span> <spanclass="comment">// parent_part = 1), part #7 (with parent_part = 3) and part #8 (with</span></div>
<divclass="line"><aname="l00104"></a><spanclass="lineno"> 104</span> <spanclass="comment">// TODO(user): the graph symmetry finder could probably benefit a lot from</span></div>
<divclass="line"><aname="l00105"></a><spanclass="lineno"> 105</span> <spanclass="comment">// keeping track of one additional bit of information for each part that</span></div>
<divclass="line"><aname="l00106"></a><spanclass="lineno"> 106</span> <spanclass="comment">// remains unchanged by a Refine() operation: was that part entirely *in*</span></div>
<divclass="line"><aname="l00107"></a><spanclass="lineno"> 107</span> <spanclass="comment">// the distinguished subset or entirely *out*?</span></div>
<divclass="line"><aname="l00110"></a><spanclass="lineno"> 110</span> <spanclass="comment">// Undo one or several Refine() operations, until the number of parts</span></div>
<divclass="line"><aname="l00111"></a><spanclass="lineno"> 111</span> <spanclass="comment">// becomes equal to "original_num_parts".</span></div>
<divclass="line"><aname="l00115"></a><spanclass="lineno"> 115</span> <spanclass="comment">// Dump the partition to a string. There might be different conventions for</span></div>
<divclass="line"><aname="l00116"></a><spanclass="lineno"> 116</span> <spanclass="comment">// sorting the parts and the elements inside them.</span></div>
<divclass="line"><aname="l00118"></a><spanclass="lineno"> 118</span> <spanclass="comment">// Elements are sorted within parts, and parts are then sorted</span></div>
<divclass="line"><aname="l00121"></a><spanclass="lineno"> 121</span> <spanclass="comment">// Elements are sorted within parts, and parts are kept in order.</span></div>
<divclass="line"><aname="l00127"></a><spanclass="lineno"> 127</span> <spanclass="comment">// All elements (0..n-1) of the partition, sorted in a way that's compatible</span></div>
<divclass="line"><aname="l00128"></a><spanclass="lineno"> 128</span> <spanclass="comment">// with the hierarchical partitioning:</span></div>
<divclass="line"><aname="l00129"></a><spanclass="lineno"> 129</span> <spanclass="comment">// - All the elements of any given part are contiguous.</span></div>
<divclass="line"><aname="l00130"></a><spanclass="lineno"> 130</span> <spanclass="comment">// - Elements of a part P are always after elements of part Parent(P).</span></div>
<divclass="line"><aname="l00131"></a><spanclass="lineno"> 131</span> <spanclass="comment">// - The order remains identical (and the above property holds) after any</span></div>
<divclass="line"><aname="l00133"></a><spanclass="lineno"> 133</span> <spanclass="comment">// Note that the order does get changed by Refine() operations.</span></div>
<divclass="line"><aname="l00134"></a><spanclass="lineno"> 134</span> <spanclass="comment">// This is a reference, so it'll only remain valid and constant until the</span></div>
<divclass="line"><aname="l00135"></a><spanclass="lineno"> 135</span> <spanclass="comment">// class is destroyed or until Refine() get called.</span></div>
<divclass="line"><aname="l00141"></a><spanclass="lineno"> 141</span> <spanclass="comment">// A DynamicPartition instance maintains a list of all of its elements,</span></div>
<divclass="line"><aname="l00142"></a><spanclass="lineno"> 142</span> <spanclass="comment">// 'sorted' by partitions: elements of the same subset are contiguous</span></div>
<divclass="line"><aname="l00143"></a><spanclass="lineno"> 143</span> <spanclass="comment">// in that list.</span></div>
<divclass="line"><aname="l00146"></a><spanclass="lineno"> 146</span> <spanclass="comment">// The reverse of elements_[]: element_[index_of_[i]] = i.</span></div>
<divclass="line"><aname="l00149"></a><spanclass="lineno"> 149</span> <spanclass="comment">// part_of_[i] is the index of the part that contains element i.</span></div>
<divclass="line"><aname="l00153"></a><spanclass="lineno"> 153</span> <spanclass="comment">// This part holds elements[start_index .. end_index-1].</span></div>
<divclass="line"><aname="l00158"></a><spanclass="lineno"> 158</span> <spanclass="comment">// The Part that this part was split out of. See the comment at Refine().</span></div>
<divclass="line"><aname="l00159"></a><spanclass="lineno"> 159</span> <spanclass="comment">// INVARIANT: part[i].parent_part <= i, and the equality holds iff part[i]</span></div>
<divclass="line"><aname="l00160"></a><spanclass="lineno"> 160</span> <spanclass="comment">// has no parent.</span></div>
<divclass="line"><aname="l00161"></a><spanclass="lineno"> 161</span> <spanclass="keywordtype">int</span> parent_part; <spanclass="comment">// Index into the part[] array.</span></div>
<divclass="line"><aname="l00163"></a><spanclass="lineno"> 163</span> <spanclass="comment">// The part's fingerprint is the XOR of all fingerprints of its elements.</span></div>
<divclass="line"><aname="l00164"></a><spanclass="lineno"> 164</span> <spanclass="comment">// See FprintOfInt32() in the .cc.</span></div>
<divclass="line"><aname="l00176"></a><spanclass="lineno"> 176</span> <spanclass="comment">// Used temporarily and exclusively by Refine(). This prevents Refine()</span></div>
<divclass="line"><aname="l00177"></a><spanclass="lineno"> 177</span> <spanclass="comment">// from being thread-safe.</span></div>
<divclass="line"><aname="l00178"></a><spanclass="lineno"> 178</span> <spanclass="comment">// INVARIANT: tmp_counter_of_part_ contains only 0s before and after Refine().</span></div>
<divclass="line"><aname="l00196"></a><spanclass="lineno"> 196</span> <spanclass="comment">// These typedefs allow this iterator to be used within testing::ElementsAre.</span></div>
<divclass="line"><aname="l00201"></a><spanclass="lineno"> 201</span> <spanclass="comment">// Partition class that supports incremental merging, using the union-find</span></div>
<divclass="line"><aname="l00202"></a><spanclass="lineno"> 202</span> <spanclass="comment">// algorithm (see http://en.wikipedia.org/wiki/Disjoint-set_data_structure).</span></div>
<divclass="line"><aname="l00205"></a><spanclass="lineno"> 205</span> <spanclass="comment">// At first, all nodes are in their own singleton part.</span></div>
<divclass="line"><aname="l00215"></a><spanclass="lineno"> 215</span> <spanclass="comment">// Return value: If this merge caused a representative node (of either node1</span></div>
<divclass="line"><aname="l00216"></a><spanclass="lineno"> 216</span> <spanclass="comment">// or node2) to stop being a representative (because only one can remain);</span></div>
<divclass="line"><aname="l00217"></a><spanclass="lineno"> 217</span> <spanclass="comment">// this method returns that removed representative. Otherwise it returns -1.</span></div>
<divclass="line"><aname="l00219"></a><spanclass="lineno"> 219</span> <spanclass="comment">// Details: a smaller part will always be merged onto a larger one.</span></div>
<divclass="line"><aname="l00220"></a><spanclass="lineno"> 220</span> <spanclass="comment">// Upons ties, the smaller representative becomes the overall representative.</span></div>
<divclass="line"><aname="l00221"></a><spanclass="lineno"> 221</span> <spanclass="keywordtype">int</span><aclass="code"href="classoperations__research_1_1MergingPartition.html#a612bd8d97219124a8d6fbac721bcdbc6">MergePartsOf</a>(<spanclass="keywordtype">int</span> node1, <spanclass="keywordtype">int</span> node2); <spanclass="comment">// The 'union' of the union-find.</span></div>
<divclass="line"><aname="l00223"></a><spanclass="lineno"> 223</span> <spanclass="comment">// Get the representative of "node" (a node in the same equivalence class,</span></div>
<divclass="line"><aname="l00224"></a><spanclass="lineno"> 224</span> <spanclass="comment">// which will also be returned for any other "node" in the same class).</span></div>
<divclass="line"><aname="l00225"></a><spanclass="lineno"> 225</span> <spanclass="comment">// The complexity if the same as MergePartsOf().</span></div>
<divclass="line"><aname="l00228"></a><spanclass="lineno"> 228</span> <spanclass="comment">// Specialized reader API: prunes "nodes" to only keep at most one node per</span></div>
<divclass="line"><aname="l00229"></a><spanclass="lineno"> 229</span> <spanclass="comment">// part: any node which is in the same part as an earlier node will be pruned.</span></div>
<divclass="line"><aname="l00232"></a><spanclass="lineno"> 232</span> <spanclass="comment">// Output the whole partition as node equivalence classes: if there are K</span></div>
<divclass="line"><aname="l00233"></a><spanclass="lineno"> 233</span> <spanclass="comment">// parts and N nodes, node_equivalence_classes[i] will contain the part index</span></div>
<divclass="line"><aname="l00234"></a><spanclass="lineno"> 234</span> <spanclass="comment">// (a number in 0..K-1) of node #i. Parts will be sorted by their first node</span></div>
<divclass="line"><aname="l00235"></a><spanclass="lineno"> 235</span> <spanclass="comment">// (i.e. node 0 will always be in part 0; then the next node that isn't in</span></div>
<divclass="line"><aname="l00236"></a><spanclass="lineno"> 236</span> <spanclass="comment">// part 0 will be in part 1, and so on).</span></div>
<divclass="line"><aname="l00237"></a><spanclass="lineno"> 237</span> <spanclass="comment">// Returns the number K of classes.</span></div>
<divclass="line"><aname="l00240"></a><spanclass="lineno"> 240</span> <spanclass="comment">// Dump all components, with nodes sorted within each part and parts</span></div>
<divclass="line"><aname="l00244"></a><spanclass="lineno"> 244</span> <spanclass="comment">// Advanced usage: sets 'node' to be in its original singleton. All nodes</span></div>
<divclass="line"><aname="l00245"></a><spanclass="lineno"> 245</span> <spanclass="comment">// who may point to 'node' as a parent will remain in an inconsistent state.</span></div>
<divclass="line"><aname="l00246"></a><spanclass="lineno"> 246</span> <spanclass="comment">// This can be used to reinitialize a MergingPartition that has been sparsely</span></div>
<divclass="line"><aname="l00247"></a><spanclass="lineno"> 247</span> <spanclass="comment">// modified in O(|modifications|).</span></div>
<divclass="line"><aname="l00248"></a><spanclass="lineno"> 248</span> <spanclass="comment">// CRASHES IF USED INCORRECTLY.</span></div>
<divclass="line"><aname="l00255"></a><spanclass="lineno"> 255</span> <spanclass="comment">// FOR DEBUGGING OR SPECIAL "CONST" ACCESS ONLY:</span></div>
<divclass="line"><aname="l00256"></a><spanclass="lineno"> 256</span> <spanclass="comment">// Find the root of the union-find tree with leaf 'node', i.e. its</span></div>
<divclass="line"><aname="l00257"></a><spanclass="lineno"> 257</span> <spanclass="comment">// representative node, but don't use path compression.</span></div>
<divclass="line"><aname="l00258"></a><spanclass="lineno"> 258</span> <spanclass="comment">// The amortized complexity can be as bad as log(N), as opposed to the</span></div>
<divclass="line"><aname="l00259"></a><spanclass="lineno"> 259</span> <spanclass="comment">// version using path compression.</span></div>
<divclass="line"><aname="l00263"></a><spanclass="lineno"> 263</span> <spanclass="comment">// Along the upwards path from 'node' to its root, set the parent of all</span></div>
<divclass="line"><aname="l00264"></a><spanclass="lineno"> 264</span> <spanclass="comment">// nodes (including the root) to 'parent'.</span></div>
<divclass="line"><aname="l00270"></a><spanclass="lineno"> 270</span> <spanclass="comment">// Used transiently by KeepOnlyOneNodePerPart().</span></div>
<divclass="line"><aname="l00274"></a><spanclass="lineno"> 274</span> <spanclass="comment">// *** Implementation of inline methods of the above classes. ***</span></div>
<divclass="ttc"id="astructoperations__research_1_1DynamicPartition_1_1IterablePart_html_a8497b34029ee966694083aa34c9022b5"><divclass="ttname"><ahref="structoperations__research_1_1DynamicPartition_1_1IterablePart.html#a8497b34029ee966694083aa34c9022b5">operations_research::DynamicPartition::IterablePart::begin</a></div><divclass="ttdeci">std::vector< int >::const_iterator begin() const</div><divclass="ttdef"><b>Definition:</b><ahref="dynamic__partition_8h_source.html#l00184">dynamic_partition.h:184</a></div></div>
<divclass="ttc"id="astructoperations__research_1_1DynamicPartition_1_1IterablePart_html_a5da1f91bd5693e0c84132f6eec873cc1"><divclass="ttname"><ahref="structoperations__research_1_1DynamicPartition_1_1IterablePart.html#a5da1f91bd5693e0c84132f6eec873cc1">operations_research::DynamicPartition::IterablePart::begin_</a></div><divclass="ttdeci">std::vector< int >::const_iterator begin_</div><divclass="ttdef"><b>Definition:</b><ahref="dynamic__partition_8h_source.html#l00186">dynamic_partition.h:186</a></div></div>
<divclass="ttc"id="astructoperations__research_1_1DynamicPartition_1_1IterablePart_html_a5a85aaf56880f04a078dc182410090df"><divclass="ttname"><ahref="structoperations__research_1_1DynamicPartition_1_1IterablePart.html#a5a85aaf56880f04a078dc182410090df">operations_research::DynamicPartition::IterablePart::const_iterator</a></div><divclass="ttdeci">std::vector< int >::const_iterator const_iterator</div><divclass="ttdef"><b>Definition:</b><ahref="dynamic__partition_8h_source.html#l00198">dynamic_partition.h:198</a></div></div>
<divclass="ttc"id="astructoperations__research_1_1DynamicPartition_1_1IterablePart_html_a152bd708ae8b28ef466f2a3fc7540ae9"><divclass="ttname"><ahref="structoperations__research_1_1DynamicPartition_1_1IterablePart.html#a152bd708ae8b28ef466f2a3fc7540ae9">operations_research::DynamicPartition::IterablePart::end</a></div><divclass="ttdeci">std::vector< int >::const_iterator end() const</div><divclass="ttdef"><b>Definition:</b><ahref="dynamic__partition_8h_source.html#l00185">dynamic_partition.h:185</a></div></div>
<divclass="ttc"id="astructoperations__research_1_1DynamicPartition_1_1IterablePart_html_ac6a060188c6c10f9609b85fd6bc9f15d"><divclass="ttname"><ahref="structoperations__research_1_1DynamicPartition_1_1IterablePart.html#ac6a060188c6c10f9609b85fd6bc9f15d">operations_research::DynamicPartition::IterablePart::end_</a></div><divclass="ttdeci">std::vector< int >::const_iterator end_</div><divclass="ttdef"><b>Definition:</b><ahref="dynamic__partition_8h_source.html#l00187">dynamic_partition.h:187</a></div></div>
<divclass="ttc"id="aclassoperations__research_1_1DynamicPartition_html_ae91b7d9b6c4f0675b9ad3f38e5761853"><divclass="ttname"><ahref="classoperations__research_1_1DynamicPartition.html#ae91b7d9b6c4f0675b9ad3f38e5761853">operations_research::DynamicPartition::NumParts</a></div><divclass="ttdeci">const int NumParts() const</div><divclass="ttdef"><b>Definition:</b><ahref="dynamic__partition_8h_source.html#l00061">dynamic_partition.h:61</a></div></div>
<divclass="ttc"id="aclassoperations__research_1_1DynamicPartition_html_a32f3aa9643111b05108d1120e48c1e13"><divclass="ttname"><ahref="classoperations__research_1_1DynamicPartition.html#a32f3aa9643111b05108d1120e48c1e13">operations_research::DynamicPartition::Refine</a></div><divclass="ttdeci">void Refine(const std::vector< int >&distinguished_subset)</div></div>
<divclass="ttc"id="astructoperations__research_1_1DynamicPartition_1_1IterablePart_html_ab94e3d7f669e4c1b2c8e6d73e5cf154d"><divclass="ttname"><ahref="structoperations__research_1_1DynamicPartition_1_1IterablePart.html#ab94e3d7f669e4c1b2c8e6d73e5cf154d">operations_research::DynamicPartition::IterablePart::IterablePart</a></div><divclass="ttdeci">IterablePart(const std::vector< int >::const_iterator &b, const std::vector< int >::const_iterator &e)</div><divclass="ttdef"><b>Definition:</b><ahref="dynamic__partition_8h_source.html#l00192">dynamic_partition.h:192</a></div></div>
<divclass="ttc"id="aclassoperations__research_1_1MergingPartition_html_a80761f181b521aa284b7e687776b9fde"><divclass="ttname"><ahref="classoperations__research_1_1MergingPartition.html#a80761f181b521aa284b7e687776b9fde">operations_research::MergingPartition::KeepOnlyOneNodePerPart</a></div><divclass="ttdeci">void KeepOnlyOneNodePerPart(std::vector< int > *nodes)</div></div>
<divclass="ttc"id="aclassoperations__research_1_1MergingPartition_html_a62cb833403d7861c5badb4de3389e06e"><divclass="ttname"><ahref="classoperations__research_1_1MergingPartition.html#a62cb833403d7861c5badb4de3389e06e">operations_research::MergingPartition::FillEquivalenceClasses</a></div><divclass="ttdeci">int FillEquivalenceClasses(std::vector< int > *node_equivalence_classes)</div></div>
<divclass="ttc"id="aclassoperations__research_1_1MergingPartition_html_a612bd8d97219124a8d6fbac721bcdbc6"><divclass="ttname"><ahref="classoperations__research_1_1MergingPartition.html#a612bd8d97219124a8d6fbac721bcdbc6">operations_research::MergingPartition::MergePartsOf</a></div><divclass="ttdeci">int MergePartsOf(int node1, int node2)</div></div>