<p>The Dynamic Programming (DP) algorithm memorizes the values f(set, node) for node in set, for all the subsets of cardinality <= max_card_. </p>
<p><aclass="el"href="classoperations__research_1_1LatticeMemoryManager.html"title="The Dynamic Programming (DP) algorithm memorizes the values f(set, node) for node in set,...">LatticeMemoryManager</a> manages the storage of f(set, node) so that the DP iteration access memory in increasing addresses. </p>
<pclass="definition">Definition at line <aclass="el"href="hamiltonian__path_8h_source.html#l00291">291</a> of file <aclass="el"href="hamiltonian__path_8h_source.html">hamiltonian_path.h</a>.</p>
<trclass="memdesc:ab5f0b45dfc80e6bddba92ea7dc8c018e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Reserves memory and fills in the data necessary to access memory. <ahref="#ab5f0b45dfc80e6bddba92ea7dc8c018e">More...</a><br/></td></tr>
<trclass="memitem:ac5d506873d40f552209caa36e734990d"><tdclass="memItemLeft"align="right"valign="top">uint64 </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="classoperations__research_1_1LatticeMemoryManager.html#ac5d506873d40f552209caa36e734990d">Offset</a> (<aclass="el"href="classoperations__research_1_1Set.html">Set</a> s, int node) const</td></tr>
<trclass="memdesc:ac5d506873d40f552209caa36e734990d"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the offset in memory for f(s, node), with node contained in s. <ahref="#ac5d506873d40f552209caa36e734990d">More...</a><br/></td></tr>
<trclass="memdesc:a5369cd69622c4264ffcf11a2d5006ecd"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the base offset in memory for f(s, node), with node contained in s. <ahref="#a5369cd69622c4264ffcf11a2d5006ecd">More...</a><br/></td></tr>
<trclass="memitem:a143a5937788ddcaa33e732f98cd26b3f"><tdclass="memItemLeft"align="right"valign="top">uint64 </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="classoperations__research_1_1LatticeMemoryManager.html#a143a5937788ddcaa33e732f98cd26b3f">OffsetDelta</a> (int card, int added_node, int removed_node, int rank) const</td></tr>
<trclass="memdesc:a143a5937788ddcaa33e732f98cd26b3f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the offset delta for a set of cardinality 'card', to which node 'removed_node' is replaced by 'added_node' at 'rank'. <ahref="#a143a5937788ddcaa33e732f98cd26b3f">More...</a><br/></td></tr>
<trclass="memitem:a59f3668d8fc5dfe2b60d96892c080229"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="classoperations__research_1_1LatticeMemoryManager.html#a59f3668d8fc5dfe2b60d96892c080229">SetValue</a> (<aclass="el"href="classoperations__research_1_1Set.html">Set</a> s, int node, CostType value)</td></tr>
<trclass="memdesc:a59f3668d8fc5dfe2b60d96892c080229"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Memorizes the value = f(s, node) at the correct offset. <ahref="#a59f3668d8fc5dfe2b60d96892c080229">More...</a><br/></td></tr>
<trclass="memdesc:a7c8e0f6e664b391264f519adfeb7eae2"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Memorizes 'value' at 'offset'. <ahref="#a7c8e0f6e664b391264f519adfeb7eae2">More...</a><br/></td></tr>
<trclass="memitem:a084e48121cdd1ab05c9d60f8f45114e5"><tdclass="memItemLeft"align="right"valign="top">CostType </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="classoperations__research_1_1LatticeMemoryManager.html#a084e48121cdd1ab05c9d60f8f45114e5">Value</a> (<aclass="el"href="classoperations__research_1_1Set.html">Set</a> s, int node) const</td></tr>
<trclass="memdesc:a084e48121cdd1ab05c9d60f8f45114e5"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the memorized value f(s, node) with node in s. <ahref="#a084e48121cdd1ab05c9d60f8f45114e5">More...</a><br/></td></tr>
<trclass="memdesc:ad91d511dbe7e638fd8a46171f906f7e6"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the memorized value at 'offset'. <ahref="#ad91d511dbe7e638fd8a46171f906f7e6">More...</a><br/></td></tr>
<pclass="definition">Definition at line <aclass="el"href="hamiltonian__path_8h_source.html#l00293">293</a> of file <aclass="el"href="hamiltonian__path_8h_source.html">hamiltonian_path.h</a>.</p>
</div>
</div>
<h2class="groupheader">Member Function Documentation</h2>
<p>This is useful in the Dynamic Programming iterations. Note(user): inlining this function gains about 5%. </p><dlclass="todo"><dt><b><aclass="el"href="todo.html#_todo000032">Todo:</a></b></dt><dd>(user): Investigate how to compute BaseOffset(card - 1, s \ { n }) from BaseOffset(card, n) to speed up the DP iteration. </dd></dl>
<p>Note(user): It is possible to get rid of base_offset_[card] by using a 2-D array. It would also make it possible to free all the memory but the layer being constructed and the preceding one, if another lattice of paths is constructed. </p><dlclass="todo"><dt><b><aclass="el"href="todo.html#_todo000027">Todo:</a></b></dt><dd>(user): Evaluate the interest of the above. There are 'card' f(set, j) to store. That is why we need to multiply local_offset by card before adding it to the corresponding base_offset_. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="hamiltonian__path_8h_source.html#l00407">407</a> of file <aclass="el"href="hamiltonian__path_8h_source.html">hamiltonian_path.h</a>.</p>
<p>Reserves memory and fills in the data necessary to access memory. </p>
<p>Initialize binomial_coefficients_ using Pascal's triangle recursion.</p>
<p>Extend to (n, n + 1) to minimize branchings in <aclass="el"href="classoperations__research_1_1LatticeMemoryManager.html#a4f81eab503a836cab0e35f7cffdf9331">LatticeMemoryManager()</a>. This also makes the recurrence above work for k = n.</p>
<p>There are k * binomial_coefficients_[max_card_][k] f(S,j) values to store for each group of f(S,j), with card(S) = k. Update base_offset[k] accordingly. </p>
<pclass="definition">Definition at line <aclass="el"href="hamiltonian__path_8h_source.html#l00357">357</a> of file <aclass="el"href="hamiltonian__path_8h_source.html">hamiltonian_path.h</a>.</p>
<p>Returns the offset in memory for f(s, node), with node contained in s. </p>
<pclass="definition">Definition at line <aclass="el"href="hamiltonian__path_8h_source.html#l00431">431</a> of file <aclass="el"href="hamiltonian__path_8h_source.html">hamiltonian_path.h</a>.</p>
<p>Returns the offset delta for a set of cardinality 'card', to which node 'removed_node' is replaced by 'added_node' at 'rank'. </p>
<pclass="definition">Definition at line <aclass="el"href="hamiltonian__path_8h_source.html#l00310">310</a> of file <aclass="el"href="hamiltonian__path_8h_source.html">hamiltonian_path.h</a>.</p>
<p>Memorizes the value = f(s, node) at the correct offset. </p>
<p>This is favored in all other uses than the Dynamic Programming iterations. </p>
<pclass="definition">Definition at line <aclass="el"href="hamiltonian__path_8h_source.html#l00443">443</a> of file <aclass="el"href="hamiltonian__path_8h_source.html">hamiltonian_path.h</a>.</p>
<p>This is useful in the Dynamic Programming iterations where we want to avoid compute the offset of a pair (set, node). </p>
<pclass="definition">Definition at line <aclass="el"href="hamiltonian__path_8h_source.html#l00323">323</a> of file <aclass="el"href="hamiltonian__path_8h_source.html">hamiltonian_path.h</a>.</p>
<p>Returns the memorized value f(s, node) with node in s. </p>
<p>This is favored in all other uses than the Dynamic Programming iterations. </p>
<pclass="definition">Definition at line <aclass="el"href="hamiltonian__path_8h_source.html#l00437">437</a> of file <aclass="el"href="hamiltonian__path_8h_source.html">hamiltonian_path.h</a>.</p>
<p>This is useful in the Dynamic Programming iterations. </p>
<pclass="definition">Definition at line <aclass="el"href="hamiltonian__path_8h_source.html#l00333">333</a> of file <aclass="el"href="hamiltonian__path_8h_source.html">hamiltonian_path.h</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>