<ahref="dynamic__partition_8h.html">Go to the documentation of this file.</a><divclass="fragment"><divclass="line"><aid="l00001"name="l00001"></a><spanclass="lineno"> 1</span><spanclass="comment">// Copyright 2010-2021 Google LLC</span></div>
<divclass="line"><aid="l00002"name="l00002"></a><spanclass="lineno"> 2</span><spanclass="comment">// Licensed under the Apache License, Version 2.0 (the "License");</span></div>
<divclass="line"><aid="l00003"name="l00003"></a><spanclass="lineno"> 3</span><spanclass="comment">// you may not use this file except in compliance with the License.</span></div>
<divclass="line"><aid="l00004"name="l00004"></a><spanclass="lineno"> 4</span><spanclass="comment">// You may obtain a copy of the License at</span></div>
<divclass="line"><aid="l00008"name="l00008"></a><spanclass="lineno"> 8</span><spanclass="comment">// Unless required by applicable law or agreed to in writing, software</span></div>
<divclass="line"><aid="l00009"name="l00009"></a><spanclass="lineno"> 9</span><spanclass="comment">// distributed under the License is distributed on an "AS IS" BASIS,</span></div>
<divclass="line"><aid="l00010"name="l00010"></a><spanclass="lineno"> 10</span><spanclass="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<divclass="line"><aid="l00011"name="l00011"></a><spanclass="lineno"> 11</span><spanclass="comment">// See the License for the specific language governing permissions and</span></div>
<divclass="line"><aid="l00012"name="l00012"></a><spanclass="lineno"> 12</span><spanclass="comment">// limitations under the License.</span></div>
<divclass="line"><aid="l00014"name="l00014"></a><spanclass="lineno"> 14</span><spanclass="comment">// TODO(user): refine this toplevel comment when this file settles.</span></div>
<divclass="line"><aid="l00016"name="l00016"></a><spanclass="lineno"> 16</span><spanclass="comment">// Two dynamic partition classes: one that incrementally splits a partition</span></div>
<divclass="line"><aid="l00017"name="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"><aid="l00018"name="l00018"></a><spanclass="lineno"> 18</span><spanclass="comment">// and less parts.</span></div>
<divclass="line"><aid="l00021"name="l00021"></a><spanclass="lineno"> 21</span><spanclass="comment">// The partition classes maintain a partition of N integers 0..N-1</span></div>
<divclass="line"><aid="l00022"name="l00022"></a><spanclass="lineno"> 22</span><spanclass="comment">// (aka "elements") into disjoint equivalence classes (aka "parts").</span></div>
<divclass="line"><aid="l00025"name="l00025"></a><spanclass="lineno"> 25</span><spanclass="comment">// Like vector<int> crashes when used improperly, these classes are not "safe":</span></div>
<divclass="line"><aid="l00026"name="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"><aid="l00027"name="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"><aid="l00041"name="l00041"></a><spanclass="lineno"> 41</span><spanclass="comment">// Partition class that supports incremental splitting, with backtracking.</span></div>
<divclass="line"><aid="l00042"name="l00042"></a><spanclass="lineno"> 42</span><spanclass="comment">// See http://en.wikipedia.org/wiki/Partition_refinement .</span></div>
<divclass="line"><aid="l00043"name="l00043"></a><spanclass="lineno"> 43</span><spanclass="comment">// More precisely, the supported edit operations are:</span></div>
<divclass="line"><aid="l00044"name="l00044"></a><spanclass="lineno"> 44</span><spanclass="comment">// - Refine the partition so that a subset S (typically, |S| <<< N)</span></div>
<divclass="line"><aid="l00045"name="l00045"></a><spanclass="lineno"> 45</span><spanclass="comment">// of elements are all considered non-equivalent to any element in ¬S.</span></div>
<divclass="line"><aid="l00046"name="l00046"></a><spanclass="lineno"> 46</span><spanclass="comment">// Typically, this should be done in O(|S|).</span></div>
<divclass="line"><aid="l00047"name="l00047"></a><spanclass="lineno"> 47</span><spanclass="comment">// - Undo the above operations (backtracking).</span></div>
<divclass="line"><aid="l00049"name="l00049"></a><spanclass="lineno"> 49</span><spanclass="comment">// TODO(user): rename this to BacktrackableSplittingPartition.</span></div>
<divclass="line"><aid="l00052"name="l00052"></a><spanclass="lineno"> 52</span><spanclass="comment">// Creates a DynamicPartition on n elements, numbered 0..n-1. Start with</span></div>
<divclass="line"><aid="l00053"name="l00053"></a><spanclass="lineno"> 53</span><spanclass="comment">// the trivial partition (only one subset containing all elements).</span></div>
<divclass="line"><aid="l00056"name="l00056"></a><spanclass="lineno"> 56</span><spanclass="comment">// Ditto, but specify the initial part of each elements. Part indices must</span></div>
<divclass="line"><aid="l00057"name="l00057"></a><spanclass="lineno"> 57</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"><aid="l00064"name="l00064"></a><spanclass="lineno"> 64</span><spanclass="comment">// To iterate over the elements in part #i:</span></div>
<divclass="line"><aid="l00065"name="l00065"></a><spanclass="lineno"> 65</span><spanclass="comment">// for (int element : partition.ElementsInPart(i)) { ... }</span></div>
<divclass="line"><aid="l00067"name="l00067"></a><spanclass="lineno"> 67</span><spanclass="comment">// ORDERING OF ELEMENTS INSIDE PARTS: the order of elements within a given</span></div>
<divclass="line"><aid="l00068"name="l00068"></a><spanclass="lineno"> 68</span><spanclass="comment">// part is volatile, and may change with Refine() or UndoRefine*() operations,</span></div>
<divclass="line"><aid="l00069"name="l00069"></a><spanclass="lineno"> 69</span><spanclass="comment">// even if the part itself doesn't change.</span></div>
<divclass="line"><aid="l00077"name="l00077"></a><spanclass="lineno"> 77</span><spanclass="comment">// A handy shortcut to ElementsInPart(PartOf(e)). The returned IterablePart</span></div>
<divclass="line"><aid="l00078"name="l00078"></a><spanclass="lineno"> 78</span><spanclass="comment">// will never be empty, since it contains at least i.</span></div>
<divclass="line"><aid="l00081"name="l00081"></a><spanclass="lineno"> 81</span><spanclass="comment">// Returns a fingerprint of the given part. While collisions are possible,</span></div>
<divclass="line"><aid="l00082"name="l00082"></a><spanclass="lineno"> 82</span><spanclass="comment">// their probability is quite low. Two parts that have the same size and the</span></div>
<divclass="line"><aid="l00083"name="l00083"></a><spanclass="lineno"> 83</span><spanclass="comment">// same fingerprint are most likely identical.</span></div>
<divclass="line"><aid="l00084"name="l00084"></a><spanclass="lineno"> 84</span><spanclass="comment">// Also, two parts that have the exact same set of elements will *always*</span></div>
<divclass="line"><aid="l00085"name="l00085"></a><spanclass="lineno"> 85</span><spanclass="comment">// have the same fingerprint.</span></div>
<divclass="line"><aid="l00088"name="l00088"></a><spanclass="lineno"> 88</span><spanclass="comment">// Refines the partition such that elements that are in distinguished_subset</span></div>
<divclass="line"><aid="l00089"name="l00089"></a><spanclass="lineno"> 89</span><spanclass="comment">// never share the same part as elements that aren't in that subset.</span></div>
<divclass="line"><aid="l00090"name="l00090"></a><spanclass="lineno"> 90</span><spanclass="comment">// This might be a no-op: in that case, NumParts() won't change, but the</span></div>
<divclass="line"><aid="l00091"name="l00091"></a><spanclass="lineno"> 91</span><spanclass="comment">// order of elements inside each part may change.</span></div>
<divclass="line"><aid="l00093"name="l00093"></a><spanclass="lineno"> 93</span><spanclass="comment">// ORDERING OF PARTS:</span></div>
<divclass="line"><aid="l00094"name="l00094"></a><spanclass="lineno"> 94</span><spanclass="comment">// For each i such that Part #i has a non-trivial intersection with</span></div>
<divclass="line"><aid="l00095"name="l00095"></a><spanclass="lineno"> 95</span><spanclass="comment">// "distinguished_subset" (neither empty, nor the full Part); Part #i is</span></div>
<divclass="line"><aid="l00096"name="l00096"></a><spanclass="lineno"> 96</span><spanclass="comment">// stripped out of all elements that are in "distinguished_subset", and</span></div>
<divclass="line"><aid="l00097"name="l00097"></a><spanclass="lineno"> 97</span><spanclass="comment">// those elements are sent to a newly created part, whose parent_part = i.</span></div>
<divclass="line"><aid="l00098"name="l00098"></a><spanclass="lineno"> 98</span><spanclass="comment">// The parts newly created by a single Refine() operations are sorted</span></div>
<divclass="line"><aid="l00099"name="l00099"></a><spanclass="lineno"> 99</span><spanclass="comment">// by parent_part.</span></div>
<divclass="line"><aid="l00100"name="l00100"></a><spanclass="lineno"> 100</span><spanclass="comment">// Example: a Refine() on a partition with 6 parts causes parts #1, #3 and</span></div>
<divclass="line"><aid="l00101"name="l00101"></a><spanclass="lineno"> 101</span><spanclass="comment">// #4 to be split: the partition will now contain 3 new parts: part #6 (with</span></div>
<divclass="line"><aid="l00102"name="l00102"></a><spanclass="lineno"> 102</span><spanclass="comment">// parent_part = 1), part #7 (with parent_part = 3) and part #8 (with</span></div>
<divclass="line"><aid="l00105"name="l00105"></a><spanclass="lineno"> 105</span><spanclass="comment">// TODO(user): the graph symmetry finder could probably benefit a lot from</span></div>
<divclass="line"><aid="l00106"name="l00106"></a><spanclass="lineno"> 106</span><spanclass="comment">// keeping track of one additional bit of information for each part that</span></div>
<divclass="line"><aid="l00107"name="l00107"></a><spanclass="lineno"> 107</span><spanclass="comment">// remains unchanged by a Refine() operation: was that part entirely *in*</span></div>
<divclass="line"><aid="l00108"name="l00108"></a><spanclass="lineno"> 108</span><spanclass="comment">// the distinguished subset or entirely *out*?</span></div>
<divclass="line"><aid="l00111"name="l00111"></a><spanclass="lineno"> 111</span><spanclass="comment">// Undo one or several Refine() operations, until the number of parts</span></div>
<divclass="line"><aid="l00112"name="l00112"></a><spanclass="lineno"> 112</span><spanclass="comment">// becomes equal to "original_num_parts".</span></div>
<divclass="line"><aid="l00116"name="l00116"></a><spanclass="lineno"> 116</span><spanclass="comment">// Dump the partition to a string. There might be different conventions for</span></div>
<divclass="line"><aid="l00117"name="l00117"></a><spanclass="lineno"> 117</span><spanclass="comment">// sorting the parts and the elements inside them.</span></div>
<divclass="line"><aid="l00119"name="l00119"></a><spanclass="lineno"> 119</span><spanclass="comment">// Elements are sorted within parts, and parts are then sorted</span></div>
<divclass="line"><aid="l00122"name="l00122"></a><spanclass="lineno"> 122</span><spanclass="comment">// Elements are sorted within parts, and parts are kept in order.</span></div>
<divclass="line"><aid="l00128"name="l00128"></a><spanclass="lineno"> 128</span><spanclass="comment">// All elements (0..n-1) of the partition, sorted in a way that's compatible</span></div>
<divclass="line"><aid="l00129"name="l00129"></a><spanclass="lineno"> 129</span><spanclass="comment">// with the hierarchical partitioning:</span></div>
<divclass="line"><aid="l00130"name="l00130"></a><spanclass="lineno"> 130</span><spanclass="comment">// - All the elements of any given part are contiguous.</span></div>
<divclass="line"><aid="l00131"name="l00131"></a><spanclass="lineno"> 131</span><spanclass="comment">// - Elements of a part P are always after elements of part Parent(P).</span></div>
<divclass="line"><aid="l00132"name="l00132"></a><spanclass="lineno"> 132</span><spanclass="comment">// - The order remains identical (and the above property holds) after any</span></div>
<divclass="line"><aid="l00134"name="l00134"></a><spanclass="lineno"> 134</span><spanclass="comment">// Note that the order does get changed by Refine() operations.</span></div>
<divclass="line"><aid="l00135"name="l00135"></a><spanclass="lineno"> 135</span><spanclass="comment">// This is a reference, so it'll only remain valid and constant until the</span></div>
<divclass="line"><aid="l00136"name="l00136"></a><spanclass="lineno"> 136</span><spanclass="comment">// class is destroyed or until Refine() get called.</span></div>
<divclass="line"><aid="l00142"name="l00142"></a><spanclass="lineno"> 142</span><spanclass="comment">// A DynamicPartition instance maintains a list of all of its elements,</span></div>
<divclass="line"><aid="l00143"name="l00143"></a><spanclass="lineno"> 143</span><spanclass="comment">// 'sorted' by partitions: elements of the same subset are contiguous</span></div>
<divclass="line"><aid="l00144"name="l00144"></a><spanclass="lineno"> 144</span><spanclass="comment">// in that list.</span></div>
<divclass="line"><aid="l00147"name="l00147"></a><spanclass="lineno"> 147</span><spanclass="comment">// The reverse of elements_[]: element_[index_of_[i]] = i.</span></div>
<divclass="line"><aid="l00150"name="l00150"></a><spanclass="lineno"> 150</span><spanclass="comment">// part_of_[i] is the index of the part that contains element i.</span></div>
<divclass="line"><aid="l00154"name="l00154"></a><spanclass="lineno"> 154</span><spanclass="comment">// This part holds elements[start_index .. end_index-1].</span></div>
<divclass="line"><aid="l00159"name="l00159"></a><spanclass="lineno"> 159</span><spanclass="comment">// The Part that this part was split out of. See the comment at Refine().</span></div>
<divclass="line"><aid="l00160"name="l00160"></a><spanclass="lineno"> 160</span><spanclass="comment">// INVARIANT: part[i].parent_part <= i, and the equality holds iff part[i]</span></div>
<divclass="line"><aid="l00161"name="l00161"></a><spanclass="lineno"> 161</span><spanclass="comment">// has no parent.</span></div>
<divclass="line"><aid="l00162"name="l00162"></a><spanclass="lineno"> 162</span><spanclass="keywordtype">int</span> parent_part; <spanclass="comment">// Index into the part[] array.</span></div>
<divclass="line"><aid="l00164"name="l00164"></a><spanclass="lineno"> 164</span><spanclass="comment">// The part's fingerprint is the XOR of all fingerprints of its elements.</span></div>
<divclass="line"><aid="l00165"name="l00165"></a><spanclass="lineno"> 165</span><spanclass="comment">// See FprintOfInt32() in the .cc.</span></div>
<divclass="line"><aid="l00177"name="l00177"></a><spanclass="lineno"> 177</span><spanclass="comment">// Used temporarily and exclusively by Refine(). This prevents Refine()</span></div>
<divclass="line"><aid="l00178"name="l00178"></a><spanclass="lineno"> 178</span><spanclass="comment">// from being thread-safe.</span></div>
<divclass="line"><aid="l00179"name="l00179"></a><spanclass="lineno"> 179</span><spanclass="comment">// INVARIANT: tmp_counter_of_part_ contains only 0s before and after Refine().</span></div>
<divclass="line"><aid="l00197"name="l00197"></a><spanclass="lineno"> 197</span><spanclass="comment">// These typedefs allow this iterator to be used within testing::ElementsAre.</span></div>
<divclass="line"><aid="l00202"name="l00202"></a><spanclass="lineno"> 202</span><spanclass="comment">// Partition class that supports incremental merging, using the union-find</span></div>
<divclass="line"><aid="l00203"name="l00203"></a><spanclass="lineno"> 203</span><spanclass="comment">// algorithm (see http://en.wikipedia.org/wiki/Disjoint-set_data_structure).</span></div>
<divclass="line"><aid="l00206"name="l00206"></a><spanclass="lineno"> 206</span><spanclass="comment">// At first, all nodes are in their own singleton part.</span></div>
<divclass="line"><aid="l00216"name="l00216"></a><spanclass="lineno"> 216</span><spanclass="comment">// Return value: If this merge caused a representative node (of either node1</span></div>
<divclass="line"><aid="l00217"name="l00217"></a><spanclass="lineno"> 217</span><spanclass="comment">// or node2) to stop being a representative (because only one can remain);</span></div>
<divclass="line"><aid="l00218"name="l00218"></a><spanclass="lineno"> 218</span><spanclass="comment">// this method returns that removed representative. Otherwise it returns -1.</span></div>
<divclass="line"><aid="l00220"name="l00220"></a><spanclass="lineno"> 220</span><spanclass="comment">// Details: a smaller part will always be merged onto a larger one.</span></div>
<divclass="line"><aid="l00221"name="l00221"></a><spanclass="lineno"> 221</span><spanclass="comment">// Upons ties, the smaller representative becomes the overall representative.</span></div>
<divclass="line"><aid="l00222"name="l00222"></a><spanclass="lineno"> 222</span><spanclass="keywordtype">int</span><aclass="code hl_function"href="classoperations__research_1_1_merging_partition.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"><aid="l00224"name="l00224"></a><spanclass="lineno"> 224</span><spanclass="comment">// Get the representative of "node" (a node in the same equivalence class,</span></div>
<divclass="line"><aid="l00225"name="l00225"></a><spanclass="lineno"> 225</span><spanclass="comment">// which will also be returned for any other "node" in the same class).</span></div>
<divclass="line"><aid="l00226"name="l00226"></a><spanclass="lineno"> 226</span><spanclass="comment">// The complexity if the same as MergePartsOf().</span></div>
<divclass="line"><aid="l00229"name="l00229"></a><spanclass="lineno"> 229</span><spanclass="comment">// Specialized reader API: prunes "nodes" to only keep at most one node per</span></div>
<divclass="line"><aid="l00230"name="l00230"></a><spanclass="lineno"> 230</span><spanclass="comment">// part: any node which is in the same part as an earlier node will be pruned.</span></div>
<divclass="line"><aid="l00233"name="l00233"></a><spanclass="lineno"> 233</span><spanclass="comment">// Output the whole partition as node equivalence classes: if there are K</span></div>
<divclass="line"><aid="l00234"name="l00234"></a><spanclass="lineno"> 234</span><spanclass="comment">// parts and N nodes, node_equivalence_classes[i] will contain the part index</span></div>
<divclass="line"><aid="l00235"name="l00235"></a><spanclass="lineno"> 235</span><spanclass="comment">// (a number in 0..K-1) of node #i. Parts will be sorted by their first node</span></div>
<divclass="line"><aid="l00236"name="l00236"></a><spanclass="lineno"> 236</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"><aid="l00237"name="l00237"></a><spanclass="lineno"> 237</span><spanclass="comment">// part 0 will be in part 1, and so on).</span></div>
<divclass="line"><aid="l00238"name="l00238"></a><spanclass="lineno"> 238</span><spanclass="comment">// Returns the number K of classes.</span></div>
<divclass="line"><aid="l00241"name="l00241"></a><spanclass="lineno"> 241</span><spanclass="comment">// Dump all components, with nodes sorted within each part and parts</span></div>
<divclass="line"><aid="l00245"name="l00245"></a><spanclass="lineno"> 245</span><spanclass="comment">// Advanced usage: sets 'node' to be in its original singleton. All nodes</span></div>
<divclass="line"><aid="l00246"name="l00246"></a><spanclass="lineno"> 246</span><spanclass="comment">// who may point to 'node' as a parent will remain in an inconsistent state.</span></div>
<divclass="line"><aid="l00247"name="l00247"></a><spanclass="lineno"> 247</span><spanclass="comment">// This can be used to reinitialize a MergingPartition that has been sparsely</span></div>
<divclass="line"><aid="l00248"name="l00248"></a><spanclass="lineno"> 248</span><spanclass="comment">// modified in O(|modifications|).</span></div>
<divclass="line"><aid="l00249"name="l00249"></a><spanclass="lineno"> 249</span><spanclass="comment">// CRASHES IF USED INCORRECTLY.</span></div>
<divclass="line"><aid="l00256"name="l00256"></a><spanclass="lineno"> 256</span><spanclass="comment">// FOR DEBUGGING OR SPECIAL "CONST" ACCESS ONLY:</span></div>
<divclass="line"><aid="l00257"name="l00257"></a><spanclass="lineno"> 257</span><spanclass="comment">// Find the root of the union-find tree with leaf 'node', i.e. its</span></div>
<divclass="line"><aid="l00258"name="l00258"></a><spanclass="lineno"> 258</span><spanclass="comment">// representative node, but don't use path compression.</span></div>
<divclass="line"><aid="l00259"name="l00259"></a><spanclass="lineno"> 259</span><spanclass="comment">// The amortized complexity can be as bad as log(N), as opposed to the</span></div>
<divclass="line"><aid="l00260"name="l00260"></a><spanclass="lineno"> 260</span><spanclass="comment">// version using path compression.</span></div>
<divclass="line"><aid="l00264"name="l00264"></a><spanclass="lineno"> 264</span><spanclass="comment">// Along the upwards path from 'node' to its root, set the parent of all</span></div>
<divclass="line"><aid="l00265"name="l00265"></a><spanclass="lineno"> 265</span><spanclass="comment">// nodes (including the root) to 'parent'.</span></div>
<divclass="line"><aid="l00271"name="l00271"></a><spanclass="lineno"> 271</span><spanclass="comment">// Used transiently by KeepOnlyOneNodePerPart().</span></div>
<divclass="line"><aid="l00275"name="l00275"></a><spanclass="lineno"> 275</span><spanclass="comment">// *** Implementation of inline methods of the above classes. ***</span></div>
<divclass="ttc"id="aclassoperations__research_1_1_dynamic_partition_html_a32f3aa9643111b05108d1120e48c1e13"><divclass="ttname"><ahref="classoperations__research_1_1_dynamic_partition.html#a32f3aa9643111b05108d1120e48c1e13">operations_research::DynamicPartition::Refine</a></div><divclass="ttdeci">void Refine(const std::vector< int >&distinguished_subset)</div><divclass="ttdef"><b>Definition:</b><ahref="dynamic__partition_8cc_source.html#l00097">dynamic_partition.cc:97</a></div></div>
<divclass="ttc"id="aclassoperations__research_1_1_dynamic_partition_html_ad8a3eb5fa76f501ec96f1664fc899c3b"><divclass="ttname"><ahref="classoperations__research_1_1_dynamic_partition.html#ad8a3eb5fa76f501ec96f1664fc899c3b">operations_research::DynamicPartition::ElementsInHierarchicalOrder</a></div><divclass="ttdeci">const std::vector< int >& ElementsInHierarchicalOrder() const</div><divclass="ttdef"><b>Definition:</b><ahref="dynamic__partition_8h_source.html#l00137">dynamic_partition.h:137</a></div></div>
<divclass="ttc"id="aclassoperations__research_1_1_dynamic_partition_html_ae91b7d9b6c4f0675b9ad3f38e5761853"><divclass="ttname"><ahref="classoperations__research_1_1_dynamic_partition.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#l00062">dynamic_partition.h:62</a></div></div>
<divclass="ttc"id="aclassoperations__research_1_1_merging_partition_html_a612bd8d97219124a8d6fbac721bcdbc6"><divclass="ttname"><ahref="classoperations__research_1_1_merging_partition.html#a612bd8d97219124a8d6fbac721bcdbc6">operations_research::MergingPartition::MergePartsOf</a></div><divclass="ttdeci">int MergePartsOf(int node1, int node2)</div><divclass="ttdef"><b>Definition:</b><ahref="dynamic__partition_8cc_source.html#l00214">dynamic_partition.cc:214</a></div></div>
<divclass="ttc"id="aclassoperations__research_1_1_merging_partition_html_a62cb833403d7861c5badb4de3389e06e"><divclass="ttname"><ahref="classoperations__research_1_1_merging_partition.html#a62cb833403d7861c5badb4de3389e06e">operations_research::MergingPartition::FillEquivalenceClasses</a></div><divclass="ttdeci">int FillEquivalenceClasses(std::vector< int > *node_equivalence_classes)</div><divclass="ttdef"><b>Definition:</b><ahref="dynamic__partition_8cc_source.html#l00262">dynamic_partition.cc:262</a></div></div>
<divclass="ttc"id="aclassoperations__research_1_1_merging_partition_html_a80761f181b521aa284b7e687776b9fde"><divclass="ttname"><ahref="classoperations__research_1_1_merging_partition.html#a80761f181b521aa284b7e687776b9fde">operations_research::MergingPartition::KeepOnlyOneNodePerPart</a></div><divclass="ttdeci">void KeepOnlyOneNodePerPart(std::vector< int > *nodes)</div><divclass="ttdef"><b>Definition:</b><ahref="dynamic__partition_8cc_source.html#l00246">dynamic_partition.cc:246</a></div></div>
<divclass="ttc"id="anamespaceoperations__research_html"><divclass="ttname"><ahref="namespaceoperations__research.html">operations_research</a></div><divclass="ttdoc">Collection of objects used to extend the Constraint Solver library.</div><divclass="ttdef"><b>Definition:</b><ahref="dense__doubly__linked__list_8h_source.html#l00021">dense_doubly_linked_list.h:21</a></div></div>
<divclass="ttc"id="astructoperations__research_1_1_dynamic_partition_1_1_iterable_part_html_a4e37f070051346d7cd493425490c175e"><divclass="ttname"><ahref="structoperations__research_1_1_dynamic_partition_1_1_iterable_part.html#a4e37f070051346d7cd493425490c175e">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#l00186">dynamic_partition.h:186</a></div></div>
<divclass="ttc"id="astructoperations__research_1_1_dynamic_partition_1_1_iterable_part_html_a5a85aaf56880f04a078dc182410090df"><divclass="ttname"><ahref="structoperations__research_1_1_dynamic_partition_1_1_iterable_part.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#l00199">dynamic_partition.h:199</a></div></div>
<divclass="ttc"id="astructoperations__research_1_1_dynamic_partition_1_1_iterable_part_html_a5da1f91bd5693e0c84132f6eec873cc1"><divclass="ttname"><ahref="structoperations__research_1_1_dynamic_partition_1_1_iterable_part.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#l00187">dynamic_partition.h:187</a></div></div>
<divclass="ttc"id="astructoperations__research_1_1_dynamic_partition_1_1_iterable_part_html_a895e8e66079521889215308182c5591b"><divclass="ttname"><ahref="structoperations__research_1_1_dynamic_partition_1_1_iterable_part.html#a895e8e66079521889215308182c5591b">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#l00185">dynamic_partition.h:185</a></div></div>
<divclass="ttc"id="astructoperations__research_1_1_dynamic_partition_1_1_iterable_part_html_ab94e3d7f669e4c1b2c8e6d73e5cf154d"><divclass="ttname"><ahref="structoperations__research_1_1_dynamic_partition_1_1_iterable_part.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#l00193">dynamic_partition.h:193</a></div></div>
<divclass="ttc"id="astructoperations__research_1_1_dynamic_partition_1_1_iterable_part_html_ac6a060188c6c10f9609b85fd6bc9f15d"><divclass="ttname"><ahref="structoperations__research_1_1_dynamic_partition_1_1_iterable_part.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#l00188">dynamic_partition.h:188</a></div></div>