mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-04-30 05:22:46 +08:00
Documentation for 53a6c16730
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.2"/>
|
||||
<meta name="generator" content="Doxygen 1.9.3"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: machine_learning::aystar_search::AyStarSearch< Puzzle > Class Template Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Algorithms_in_C++<span id="projectnumber"> 1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">Set of algorithms implemented in C++.</div>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.2 -->
|
||||
<!-- Generated by Doxygen 1.9.3 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
|
||||
@@ -103,6 +103,12 @@ $(document).ready(function(){initNavTree('da/d02/classmachine__learning_1_1aysta
|
||||
|
||||
<p>A class defining <a href="https://en.wikipedia.org/wiki/A*_search_algorithm" target="_blank">A* search algorithm</a>. for some initial state and final state.
|
||||
<a href="../../da/d02/classmachine__learning_1_1aystar__search_1_1_ay_star_search.html#details">More...</a></p>
|
||||
<div class="dynheader">
|
||||
Collaboration diagram for machine_learning::aystar_search::AyStarSearch< Puzzle >:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d7/db3/classmachine__learning_1_1aystar__search_1_1_ay_star_search__coll__graph.svg" width="184" height="408"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
</div>
|
||||
<center><span class="legend">[<a target="top" href="../../graph_legend.html">legend</a>]</span></center></div>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
|
||||
Classes</h2></td></tr>
|
||||
@@ -178,7 +184,7 @@ template<typename Puzzle > </div>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname"><a class="el" href="../../da/d02/classmachine__learning_1_1aystar__search_1_1_ay_star_search.html">machine_learning::aystar_search::AyStarSearch</a>< Puzzle >::<a class="el" href="../../da/d02/classmachine__learning_1_1aystar__search_1_1_ay_star_search.html">AyStarSearch</a> </td>
|
||||
<td class="memname"><a class="el" href="../../da/d02/classmachine__learning_1_1aystar__search_1_1_ay_star_search.html">machine_learning::aystar_search::AyStarSearch</a>< Puzzle >::AyStarSearch </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">const Puzzle & </td>
|
||||
<td class="paramname"><em>initial</em>, </td>
|
||||
@@ -210,10 +216,10 @@ template<typename Puzzle > </div>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><a id="l00392" name="l00392"></a><span class="lineno"> 392</span> {</div>
|
||||
<div class="line"><a id="l00393" name="l00393"></a><span class="lineno"> 393</span> Initial = std::make_shared<Info>(initial);</div>
|
||||
<div class="line"><a id="l00394" name="l00394"></a><span class="lineno"> 394</span> Final = std::make_shared<Info>(<span class="keyword">final</span>);</div>
|
||||
<div class="line"><a id="l00395" name="l00395"></a><span class="lineno"> 395</span> }</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 392</span> {</div>
|
||||
<div class="line"><span class="lineno"> 393</span> Initial = std::make_shared<Info>(initial);</div>
|
||||
<div class="line"><span class="lineno"> 394</span> Final = std::make_shared<Info>(<span class="keyword">final</span>);</div>
|
||||
<div class="line"><span class="lineno"> 395</span> }</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -265,101 +271,101 @@ template<typename Puzzle > </div>
|
||||
<p >Stores the g_score</p>
|
||||
<p >Stores the list to explore</p>
|
||||
<p >Stores the list that are explored</p>
|
||||
<div class="fragment"><div class="line"><a id="l00431" name="l00431"></a><span class="lineno"> 431</span> {</div>
|
||||
<div class="line"><a id="l00432" name="l00432"></a><span class="lineno"> 432</span> MapOfPuzzleInfoWithPuzzleInfo</div>
|
||||
<div class="line"><a id="l00433" name="l00433"></a><span class="lineno"> 433</span> parent_of; <span class="comment">/// Stores the parent of the states</span></div>
|
||||
<div class="line"><a id="l00434" name="l00434"></a><span class="lineno"> 434</span> MapOfPuzzleInfoWithInteger g_score; <span class="comment">/// Stores the g_score</span></div>
|
||||
<div class="line"><a id="l00435" name="l00435"></a><span class="lineno"> 435</span> SetOfPuzzleInfo open_list; <span class="comment">/// Stores the list to explore</span></div>
|
||||
<div class="line"><a id="l00436" name="l00436"></a><span class="lineno"> 436</span> SetOfPuzzleInfo closed_list; <span class="comment">/// Stores the list that are explored</span></div>
|
||||
<div class="line"><a id="l00437" name="l00437"></a><span class="lineno"> 437</span> </div>
|
||||
<div class="line"><a id="l00438" name="l00438"></a><span class="lineno"> 438</span> <span class="comment">// Before starting the AyStartSearch, initialize the set and maps</span></div>
|
||||
<div class="line"><a id="l00439" name="l00439"></a><span class="lineno"> 439</span> open_list.emplace(Initial);</div>
|
||||
<div class="line"><a id="l00440" name="l00440"></a><span class="lineno"> 440</span> parent_of[Initial] = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><a id="l00441" name="l00441"></a><span class="lineno"> 441</span> g_score[Initial] = 0;</div>
|
||||
<div class="line"><a id="l00442" name="l00442"></a><span class="lineno"> 442</span> </div>
|
||||
<div class="line"><a id="l00443" name="l00443"></a><span class="lineno"> 443</span> <span class="keywordflow">while</span> (!open_list.empty()) {</div>
|
||||
<div class="line"><a id="l00444" name="l00444"></a><span class="lineno"> 444</span> <span class="comment">// Iterator for state having having lowest f_score.</span></div>
|
||||
<div class="line"><a id="l00445" name="l00445"></a><span class="lineno"> 445</span> <span class="keyword">typename</span> SetOfPuzzleInfo::iterator it_low_f_score;</div>
|
||||
<div class="line"><a id="l00446" name="l00446"></a><span class="lineno"> 446</span> uint32_t min_f_score = 1e9;</div>
|
||||
<div class="line"><a id="l00447" name="l00447"></a><span class="lineno"> 447</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> iter = open_list.begin(); iter != open_list.end();</div>
|
||||
<div class="line"><a id="l00448" name="l00448"></a><span class="lineno"> 448</span> ++iter) {</div>
|
||||
<div class="line"><a id="l00449" name="l00449"></a><span class="lineno"> 449</span> <span class="comment">// f score here is evaluated by g score (depth) and h score</span></div>
|
||||
<div class="line"><a id="l00450" name="l00450"></a><span class="lineno"> 450</span> <span class="comment">// (distance between current state and final state)</span></div>
|
||||
<div class="line"><a id="l00451" name="l00451"></a><span class="lineno"> 451</span> uint32_t f_score = (*iter)->heuristic_value + (*iter)->depth;</div>
|
||||
<div class="line"><a id="l00452" name="l00452"></a><span class="lineno"> 452</span> <span class="keywordflow">if</span> (f_score < min_f_score) {</div>
|
||||
<div class="line"><a id="l00453" name="l00453"></a><span class="lineno"> 453</span> min_f_score = f_score;</div>
|
||||
<div class="line"><a id="l00454" name="l00454"></a><span class="lineno"> 454</span> it_low_f_score = iter;</div>
|
||||
<div class="line"><a id="l00455" name="l00455"></a><span class="lineno"> 455</span> }</div>
|
||||
<div class="line"><a id="l00456" name="l00456"></a><span class="lineno"> 456</span> }</div>
|
||||
<div class="line"><a id="l00457" name="l00457"></a><span class="lineno"> 457</span> </div>
|
||||
<div class="line"><a id="l00458" name="l00458"></a><span class="lineno"> 458</span> <span class="comment">// current_state, stores lowest f score so far for this state.</span></div>
|
||||
<div class="line"><a id="l00459" name="l00459"></a><span class="lineno"> 459</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<Info></a> current_state = *it_low_f_score;</div>
|
||||
<div class="line"><a id="l00460" name="l00460"></a><span class="lineno"> 460</span> </div>
|
||||
<div class="line"><a id="l00461" name="l00461"></a><span class="lineno"> 461</span> <span class="comment">// if this current state is equal to final, return</span></div>
|
||||
<div class="line"><a id="l00462" name="l00462"></a><span class="lineno"> 462</span> <span class="keywordflow">if</span> (*(current_state->state) == *(Final->state)) {</div>
|
||||
<div class="line"><a id="l00463" name="l00463"></a><span class="lineno"> 463</span> <span class="keywordflow">return</span> <a class="code hl_function" href="../../da/d02/classmachine__learning_1_1aystar__search_1_1_ay_star_search.html#a0a26aa9ad3d73707370d9fe83707aca4">Solution</a>(current_state, parent_of);</div>
|
||||
<div class="line"><a id="l00464" name="l00464"></a><span class="lineno"> 464</span> }</div>
|
||||
<div class="line"><a id="l00465" name="l00465"></a><span class="lineno"> 465</span> <span class="comment">// else remove from open list as visited.</span></div>
|
||||
<div class="line"><a id="l00466" name="l00466"></a><span class="lineno"> 466</span> open_list.erase(it_low_f_score);</div>
|
||||
<div class="line"><a id="l00467" name="l00467"></a><span class="lineno"> 467</span> <span class="comment">// if current_state has exceeded the allowed depth, skip</span></div>
|
||||
<div class="line"><a id="l00468" name="l00468"></a><span class="lineno"> 468</span> <span class="comment">// neighbor checking</span></div>
|
||||
<div class="line"><a id="l00469" name="l00469"></a><span class="lineno"> 469</span> <span class="keywordflow">if</span> (current_state->depth >= permissible_depth) {</div>
|
||||
<div class="line"><a id="l00470" name="l00470"></a><span class="lineno"> 470</span> <span class="keywordflow">continue</span>;</div>
|
||||
<div class="line"><a id="l00471" name="l00471"></a><span class="lineno"> 471</span> }</div>
|
||||
<div class="line"><a id="l00472" name="l00472"></a><span class="lineno"> 472</span> <span class="comment">// Generate all possible moves (neighbors) given the current</span></div>
|
||||
<div class="line"><a id="l00473" name="l00473"></a><span class="lineno"> 473</span> <span class="comment">// state</span></div>
|
||||
<div class="line"><a id="l00474" name="l00474"></a><span class="lineno"> 474</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<Puzzle></a> total_possible_moves =</div>
|
||||
<div class="line"><a id="l00475" name="l00475"></a><span class="lineno"> 475</span> current_state->state->generate_possible_moves();</div>
|
||||
<div class="line"><a id="l00476" name="l00476"></a><span class="lineno"> 476</span> </div>
|
||||
<div class="line"><a id="l00477" name="l00477"></a><span class="lineno"> 477</span> <span class="keywordflow">for</span> (Puzzle &neighbor : total_possible_moves) {</div>
|
||||
<div class="line"><a id="l00478" name="l00478"></a><span class="lineno"> 478</span> <span class="comment">// calculate score of neighbors with respect to</span></div>
|
||||
<div class="line"><a id="l00479" name="l00479"></a><span class="lineno"> 479</span> <span class="comment">// current_state</span></div>
|
||||
<div class="line"><a id="l00480" name="l00480"></a><span class="lineno"> 480</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<Info></a> Neighbor = std::make_shared<Info>(</div>
|
||||
<div class="line"><a id="l00481" name="l00481"></a><span class="lineno"> 481</span> neighbor, dist(neighbor, *(Final->state)),</div>
|
||||
<div class="line"><a id="l00482" name="l00482"></a><span class="lineno"> 482</span> current_state->depth + 1U);</div>
|
||||
<div class="line"><a id="l00483" name="l00483"></a><span class="lineno"> 483</span> uint32_t temp_g_score = Neighbor->depth;</div>
|
||||
<div class="line"><a id="l00484" name="l00484"></a><span class="lineno"> 484</span> </div>
|
||||
<div class="line"><a id="l00485" name="l00485"></a><span class="lineno"> 485</span> <span class="comment">// Check whether this state is explored.</span></div>
|
||||
<div class="line"><a id="l00486" name="l00486"></a><span class="lineno"> 486</span> <span class="comment">// If this state is discovered at greater depth, then discard,</span></div>
|
||||
<div class="line"><a id="l00487" name="l00487"></a><span class="lineno"> 487</span> <span class="comment">// else remove from closed list and explore the node</span></div>
|
||||
<div class="line"><a id="l00488" name="l00488"></a><span class="lineno"> 488</span> <span class="keyword">auto</span> closed_list_iter = closed_list.find(Neighbor);</div>
|
||||
<div class="line"><a id="l00489" name="l00489"></a><span class="lineno"> 489</span> <span class="keywordflow">if</span> (closed_list_iter != closed_list.end()) {</div>
|
||||
<div class="line"><a id="l00490" name="l00490"></a><span class="lineno"> 490</span> <span class="comment">// 1. If state in closed list has higher depth, then remove</span></div>
|
||||
<div class="line"><a id="l00491" name="l00491"></a><span class="lineno"> 491</span> <span class="comment">// from list since we have found better option,</span></div>
|
||||
<div class="line"><a id="l00492" name="l00492"></a><span class="lineno"> 492</span> <span class="comment">// 2. Else don't explore this state.</span></div>
|
||||
<div class="line"><a id="l00493" name="l00493"></a><span class="lineno"> 493</span> <span class="keywordflow">if</span> (Neighbor->depth < (*closed_list_iter)->depth) {</div>
|
||||
<div class="line"><a id="l00494" name="l00494"></a><span class="lineno"> 494</span> closed_list.erase(closed_list_iter);</div>
|
||||
<div class="line"><a id="l00495" name="l00495"></a><span class="lineno"> 495</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00496" name="l00496"></a><span class="lineno"> 496</span> <span class="keywordflow">continue</span>;</div>
|
||||
<div class="line"><a id="l00497" name="l00497"></a><span class="lineno"> 497</span> }</div>
|
||||
<div class="line"><a id="l00498" name="l00498"></a><span class="lineno"> 498</span> }</div>
|
||||
<div class="line"><a id="l00499" name="l00499"></a><span class="lineno"> 499</span> <span class="keyword">auto</span> neighbor_g_score_iter = g_score.find(Neighbor);</div>
|
||||
<div class="line"><a id="l00500" name="l00500"></a><span class="lineno"> 500</span> <span class="comment">// if the neighbor is already created and has minimum</span></div>
|
||||
<div class="line"><a id="l00501" name="l00501"></a><span class="lineno"> 501</span> <span class="comment">// g_score, then update g_score and f_score else insert new</span></div>
|
||||
<div class="line"><a id="l00502" name="l00502"></a><span class="lineno"> 502</span> <span class="keywordflow">if</span> (neighbor_g_score_iter != g_score.end()) {</div>
|
||||
<div class="line"><a id="l00503" name="l00503"></a><span class="lineno"> 503</span> <span class="keywordflow">if</span> (neighbor_g_score_iter->second > temp_g_score) {</div>
|
||||
<div class="line"><a id="l00504" name="l00504"></a><span class="lineno"> 504</span> neighbor_g_score_iter->second = temp_g_score;</div>
|
||||
<div class="line"><a id="l00505" name="l00505"></a><span class="lineno"> 505</span> parent_of[Neighbor] = current_state;</div>
|
||||
<div class="line"><a id="l00506" name="l00506"></a><span class="lineno"> 506</span> }</div>
|
||||
<div class="line"><a id="l00507" name="l00507"></a><span class="lineno"> 507</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00508" name="l00508"></a><span class="lineno"> 508</span> g_score[Neighbor] = temp_g_score;</div>
|
||||
<div class="line"><a id="l00509" name="l00509"></a><span class="lineno"> 509</span> parent_of[Neighbor] = current_state;</div>
|
||||
<div class="line"><a id="l00510" name="l00510"></a><span class="lineno"> 510</span> }</div>
|
||||
<div class="line"><a id="l00511" name="l00511"></a><span class="lineno"> 511</span> <span class="comment">// If this is a new state, insert into open_list</span></div>
|
||||
<div class="line"><a id="l00512" name="l00512"></a><span class="lineno"> 512</span> <span class="comment">// else update if the this state has better g score than</span></div>
|
||||
<div class="line"><a id="l00513" name="l00513"></a><span class="lineno"> 513</span> <span class="comment">// existing one.</span></div>
|
||||
<div class="line"><a id="l00514" name="l00514"></a><span class="lineno"> 514</span> <span class="keyword">auto</span> iter = open_list.find(Neighbor);</div>
|
||||
<div class="line"><a id="l00515" name="l00515"></a><span class="lineno"> 515</span> <span class="keywordflow">if</span> (iter == open_list.end()) {</div>
|
||||
<div class="line"><a id="l00516" name="l00516"></a><span class="lineno"> 516</span> open_list.emplace(Neighbor);</div>
|
||||
<div class="line"><a id="l00517" name="l00517"></a><span class="lineno"> 517</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((*iter)->depth > Neighbor->depth) {</div>
|
||||
<div class="line"><a id="l00518" name="l00518"></a><span class="lineno"> 518</span> (*iter)->depth = Neighbor->depth;</div>
|
||||
<div class="line"><a id="l00519" name="l00519"></a><span class="lineno"> 519</span> }</div>
|
||||
<div class="line"><a id="l00520" name="l00520"></a><span class="lineno"> 520</span> }</div>
|
||||
<div class="line"><a id="l00521" name="l00521"></a><span class="lineno"> 521</span> closed_list.emplace(current_state);</div>
|
||||
<div class="line"><a id="l00522" name="l00522"></a><span class="lineno"> 522</span> }</div>
|
||||
<div class="line"><a id="l00523" name="l00523"></a><span class="lineno"> 523</span> <span class="comment">// Cannot find the solution, return empty vector</span></div>
|
||||
<div class="line"><a id="l00524" name="l00524"></a><span class="lineno"> 524</span> <span class="keywordflow">return</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<Puzzle></a>(0);</div>
|
||||
<div class="line"><a id="l00525" name="l00525"></a><span class="lineno"> 525</span> }</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 431</span> {</div>
|
||||
<div class="line"><span class="lineno"> 432</span> MapOfPuzzleInfoWithPuzzleInfo</div>
|
||||
<div class="line"><span class="lineno"> 433</span> parent_of; <span class="comment">/// Stores the parent of the states</span></div>
|
||||
<div class="line"><span class="lineno"> 434</span> MapOfPuzzleInfoWithInteger g_score; <span class="comment">/// Stores the g_score</span></div>
|
||||
<div class="line"><span class="lineno"> 435</span> SetOfPuzzleInfo open_list; <span class="comment">/// Stores the list to explore</span></div>
|
||||
<div class="line"><span class="lineno"> 436</span> SetOfPuzzleInfo closed_list; <span class="comment">/// Stores the list that are explored</span></div>
|
||||
<div class="line"><span class="lineno"> 437</span> </div>
|
||||
<div class="line"><span class="lineno"> 438</span> <span class="comment">// Before starting the AyStartSearch, initialize the set and maps</span></div>
|
||||
<div class="line"><span class="lineno"> 439</span> open_list.emplace(Initial);</div>
|
||||
<div class="line"><span class="lineno"> 440</span> parent_of[Initial] = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><span class="lineno"> 441</span> g_score[Initial] = 0;</div>
|
||||
<div class="line"><span class="lineno"> 442</span> </div>
|
||||
<div class="line"><span class="lineno"> 443</span> <span class="keywordflow">while</span> (!open_list.empty()) {</div>
|
||||
<div class="line"><span class="lineno"> 444</span> <span class="comment">// Iterator for state having having lowest f_score.</span></div>
|
||||
<div class="line"><span class="lineno"> 445</span> <span class="keyword">typename</span> SetOfPuzzleInfo::iterator it_low_f_score;</div>
|
||||
<div class="line"><span class="lineno"> 446</span> uint32_t min_f_score = 1e9;</div>
|
||||
<div class="line"><span class="lineno"> 447</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> iter = open_list.begin(); iter != open_list.end();</div>
|
||||
<div class="line"><span class="lineno"> 448</span> ++iter) {</div>
|
||||
<div class="line"><span class="lineno"> 449</span> <span class="comment">// f score here is evaluated by g score (depth) and h score</span></div>
|
||||
<div class="line"><span class="lineno"> 450</span> <span class="comment">// (distance between current state and final state)</span></div>
|
||||
<div class="line"><span class="lineno"> 451</span> uint32_t f_score = (*iter)->heuristic_value + (*iter)->depth;</div>
|
||||
<div class="line"><span class="lineno"> 452</span> <span class="keywordflow">if</span> (f_score < min_f_score) {</div>
|
||||
<div class="line"><span class="lineno"> 453</span> min_f_score = f_score;</div>
|
||||
<div class="line"><span class="lineno"> 454</span> it_low_f_score = iter;</div>
|
||||
<div class="line"><span class="lineno"> 455</span> }</div>
|
||||
<div class="line"><span class="lineno"> 456</span> }</div>
|
||||
<div class="line"><span class="lineno"> 457</span> </div>
|
||||
<div class="line"><span class="lineno"> 458</span> <span class="comment">// current_state, stores lowest f score so far for this state.</span></div>
|
||||
<div class="line"><span class="lineno"> 459</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<Info></a> current_state = *it_low_f_score;</div>
|
||||
<div class="line"><span class="lineno"> 460</span> </div>
|
||||
<div class="line"><span class="lineno"> 461</span> <span class="comment">// if this current state is equal to final, return</span></div>
|
||||
<div class="line"><span class="lineno"> 462</span> <span class="keywordflow">if</span> (*(current_state->state) == *(Final->state)) {</div>
|
||||
<div class="line"><span class="lineno"> 463</span> <span class="keywordflow">return</span> <a class="code hl_function" href="../../da/d02/classmachine__learning_1_1aystar__search_1_1_ay_star_search.html#a0a26aa9ad3d73707370d9fe83707aca4">Solution</a>(current_state, parent_of);</div>
|
||||
<div class="line"><span class="lineno"> 464</span> }</div>
|
||||
<div class="line"><span class="lineno"> 465</span> <span class="comment">// else remove from open list as visited.</span></div>
|
||||
<div class="line"><span class="lineno"> 466</span> open_list.erase(it_low_f_score);</div>
|
||||
<div class="line"><span class="lineno"> 467</span> <span class="comment">// if current_state has exceeded the allowed depth, skip</span></div>
|
||||
<div class="line"><span class="lineno"> 468</span> <span class="comment">// neighbor checking</span></div>
|
||||
<div class="line"><span class="lineno"> 469</span> <span class="keywordflow">if</span> (current_state->depth >= permissible_depth) {</div>
|
||||
<div class="line"><span class="lineno"> 470</span> <span class="keywordflow">continue</span>;</div>
|
||||
<div class="line"><span class="lineno"> 471</span> }</div>
|
||||
<div class="line"><span class="lineno"> 472</span> <span class="comment">// Generate all possible moves (neighbors) given the current</span></div>
|
||||
<div class="line"><span class="lineno"> 473</span> <span class="comment">// state</span></div>
|
||||
<div class="line"><span class="lineno"> 474</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<Puzzle></a> total_possible_moves =</div>
|
||||
<div class="line"><span class="lineno"> 475</span> current_state->state->generate_possible_moves();</div>
|
||||
<div class="line"><span class="lineno"> 476</span> </div>
|
||||
<div class="line"><span class="lineno"> 477</span> <span class="keywordflow">for</span> (Puzzle &neighbor : total_possible_moves) {</div>
|
||||
<div class="line"><span class="lineno"> 478</span> <span class="comment">// calculate score of neighbors with respect to</span></div>
|
||||
<div class="line"><span class="lineno"> 479</span> <span class="comment">// current_state</span></div>
|
||||
<div class="line"><span class="lineno"> 480</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<Info></a> Neighbor = std::make_shared<Info>(</div>
|
||||
<div class="line"><span class="lineno"> 481</span> neighbor, dist(neighbor, *(Final->state)),</div>
|
||||
<div class="line"><span class="lineno"> 482</span> current_state->depth + 1U);</div>
|
||||
<div class="line"><span class="lineno"> 483</span> uint32_t temp_g_score = Neighbor->depth;</div>
|
||||
<div class="line"><span class="lineno"> 484</span> </div>
|
||||
<div class="line"><span class="lineno"> 485</span> <span class="comment">// Check whether this state is explored.</span></div>
|
||||
<div class="line"><span class="lineno"> 486</span> <span class="comment">// If this state is discovered at greater depth, then discard,</span></div>
|
||||
<div class="line"><span class="lineno"> 487</span> <span class="comment">// else remove from closed list and explore the node</span></div>
|
||||
<div class="line"><span class="lineno"> 488</span> <span class="keyword">auto</span> closed_list_iter = closed_list.find(Neighbor);</div>
|
||||
<div class="line"><span class="lineno"> 489</span> <span class="keywordflow">if</span> (closed_list_iter != closed_list.end()) {</div>
|
||||
<div class="line"><span class="lineno"> 490</span> <span class="comment">// 1. If state in closed list has higher depth, then remove</span></div>
|
||||
<div class="line"><span class="lineno"> 491</span> <span class="comment">// from list since we have found better option,</span></div>
|
||||
<div class="line"><span class="lineno"> 492</span> <span class="comment">// 2. Else don't explore this state.</span></div>
|
||||
<div class="line"><span class="lineno"> 493</span> <span class="keywordflow">if</span> (Neighbor->depth < (*closed_list_iter)->depth) {</div>
|
||||
<div class="line"><span class="lineno"> 494</span> closed_list.erase(closed_list_iter);</div>
|
||||
<div class="line"><span class="lineno"> 495</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><span class="lineno"> 496</span> <span class="keywordflow">continue</span>;</div>
|
||||
<div class="line"><span class="lineno"> 497</span> }</div>
|
||||
<div class="line"><span class="lineno"> 498</span> }</div>
|
||||
<div class="line"><span class="lineno"> 499</span> <span class="keyword">auto</span> neighbor_g_score_iter = g_score.find(Neighbor);</div>
|
||||
<div class="line"><span class="lineno"> 500</span> <span class="comment">// if the neighbor is already created and has minimum</span></div>
|
||||
<div class="line"><span class="lineno"> 501</span> <span class="comment">// g_score, then update g_score and f_score else insert new</span></div>
|
||||
<div class="line"><span class="lineno"> 502</span> <span class="keywordflow">if</span> (neighbor_g_score_iter != g_score.end()) {</div>
|
||||
<div class="line"><span class="lineno"> 503</span> <span class="keywordflow">if</span> (neighbor_g_score_iter->second > temp_g_score) {</div>
|
||||
<div class="line"><span class="lineno"> 504</span> neighbor_g_score_iter->second = temp_g_score;</div>
|
||||
<div class="line"><span class="lineno"> 505</span> parent_of[Neighbor] = current_state;</div>
|
||||
<div class="line"><span class="lineno"> 506</span> }</div>
|
||||
<div class="line"><span class="lineno"> 507</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><span class="lineno"> 508</span> g_score[Neighbor] = temp_g_score;</div>
|
||||
<div class="line"><span class="lineno"> 509</span> parent_of[Neighbor] = current_state;</div>
|
||||
<div class="line"><span class="lineno"> 510</span> }</div>
|
||||
<div class="line"><span class="lineno"> 511</span> <span class="comment">// If this is a new state, insert into open_list</span></div>
|
||||
<div class="line"><span class="lineno"> 512</span> <span class="comment">// else update if the this state has better g score than</span></div>
|
||||
<div class="line"><span class="lineno"> 513</span> <span class="comment">// existing one.</span></div>
|
||||
<div class="line"><span class="lineno"> 514</span> <span class="keyword">auto</span> iter = open_list.find(Neighbor);</div>
|
||||
<div class="line"><span class="lineno"> 515</span> <span class="keywordflow">if</span> (iter == open_list.end()) {</div>
|
||||
<div class="line"><span class="lineno"> 516</span> open_list.emplace(Neighbor);</div>
|
||||
<div class="line"><span class="lineno"> 517</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((*iter)->depth > Neighbor->depth) {</div>
|
||||
<div class="line"><span class="lineno"> 518</span> (*iter)->depth = Neighbor->depth;</div>
|
||||
<div class="line"><span class="lineno"> 519</span> }</div>
|
||||
<div class="line"><span class="lineno"> 520</span> }</div>
|
||||
<div class="line"><span class="lineno"> 521</span> closed_list.emplace(current_state);</div>
|
||||
<div class="line"><span class="lineno"> 522</span> }</div>
|
||||
<div class="line"><span class="lineno"> 523</span> <span class="comment">// Cannot find the solution, return empty vector</span></div>
|
||||
<div class="line"><span class="lineno"> 524</span> <span class="keywordflow">return</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<Puzzle></a>(0);</div>
|
||||
<div class="line"><span class="lineno"> 525</span> }</div>
|
||||
<div class="ttc" id="aclassmachine__learning_1_1aystar__search_1_1_ay_star_search_html_a0a26aa9ad3d73707370d9fe83707aca4"><div class="ttname"><a href="../../da/d02/classmachine__learning_1_1aystar__search_1_1_ay_star_search.html#a0a26aa9ad3d73707370d9fe83707aca4">machine_learning::aystar_search::AyStarSearch::Solution</a></div><div class="ttdeci">std::vector< Puzzle > Solution(std::shared_ptr< Info > FinalState, const MapOfPuzzleInfoWithPuzzleInfo &parent_of)</div><div class="ttdoc">A helper solution: launches when a solution for AyStarSearch is found.</div><div class="ttdef"><b>Definition:</b> a_star_search.cpp:405</div></div>
|
||||
<div class="ttc" id="ashared_ptr_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a></div></div>
|
||||
<div class="ttc" id="avector_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a></div></div>
|
||||
@@ -384,7 +390,7 @@ template<typename Puzzle > </div>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< Puzzle > <a class="el" href="../../da/d02/classmachine__learning_1_1aystar__search_1_1_ay_star_search.html">machine_learning::aystar_search::AyStarSearch</a>< Puzzle >::<a class="el" href="../../dd/d4f/class_solution.html">Solution</a> </td>
|
||||
<td class="memname"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< Puzzle > <a class="el" href="../../da/d02/classmachine__learning_1_1aystar__search_1_1_ay_star_search.html">machine_learning::aystar_search::AyStarSearch</a>< Puzzle ><a class="el" href="../../dd/d4f/class_solution.html">::Solution</a> </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a>< <a class="el" href="../../da/d70/structmachine__learning_1_1aystar__search_1_1_ay_star_search_1_1_info.html">Info</a> > </td>
|
||||
<td class="paramname"><em>FinalState</em>, </td>
|
||||
@@ -417,20 +423,20 @@ template<typename Puzzle > </div>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>the list of moves denoting moves from final state to initial state (in reverse) </dd></dl>
|
||||
<div class="fragment"><div class="line"><a id="l00407" name="l00407"></a><span class="lineno"> 407</span> {</div>
|
||||
<div class="line"><a id="l00408" name="l00408"></a><span class="lineno"> 408</span> <span class="comment">// Useful for traversing from final state to current state.</span></div>
|
||||
<div class="line"><a id="l00409" name="l00409"></a><span class="lineno"> 409</span> <span class="keyword">auto</span> current_state = FinalState;</div>
|
||||
<div class="line"><a id="l00410" name="l00410"></a><span class="lineno"> 410</span> <span class="comment">/*</span></div>
|
||||
<div class="line"><a id="l00411" name="l00411"></a><span class="lineno"> 411</span><span class="comment"> * For storing the solution tree starting from initial state to</span></div>
|
||||
<div class="line"><a id="l00412" name="l00412"></a><span class="lineno"> 412</span><span class="comment"> * final state</span></div>
|
||||
<div class="line"><a id="l00413" name="l00413"></a><span class="lineno"> 413</span><span class="comment"> */</span></div>
|
||||
<div class="line"><a id="l00414" name="l00414"></a><span class="lineno"> 414</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<Puzzle></a> answer;</div>
|
||||
<div class="line"><a id="l00415" name="l00415"></a><span class="lineno"> 415</span> <span class="keywordflow">while</span> (current_state != <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><a id="l00416" name="l00416"></a><span class="lineno"> 416</span> answer.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/emplace_back.html">emplace_back</a>(*current_state->state);</div>
|
||||
<div class="line"><a id="l00417" name="l00417"></a><span class="lineno"> 417</span> current_state = parent_of.find(current_state)->second;</div>
|
||||
<div class="line"><a id="l00418" name="l00418"></a><span class="lineno"> 418</span> }</div>
|
||||
<div class="line"><a id="l00419" name="l00419"></a><span class="lineno"> 419</span> <span class="keywordflow">return</span> answer;</div>
|
||||
<div class="line"><a id="l00420" name="l00420"></a><span class="lineno"> 420</span> }</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 407</span> {</div>
|
||||
<div class="line"><span class="lineno"> 408</span> <span class="comment">// Useful for traversing from final state to current state.</span></div>
|
||||
<div class="line"><span class="lineno"> 409</span> <span class="keyword">auto</span> current_state = FinalState;</div>
|
||||
<div class="line"><span class="lineno"> 410</span> <span class="comment">/*</span></div>
|
||||
<div class="line"><span class="lineno"> 411</span><span class="comment"> * For storing the solution tree starting from initial state to</span></div>
|
||||
<div class="line"><span class="lineno"> 412</span><span class="comment"> * final state</span></div>
|
||||
<div class="line"><span class="lineno"> 413</span><span class="comment"> */</span></div>
|
||||
<div class="line"><span class="lineno"> 414</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<Puzzle></a> answer;</div>
|
||||
<div class="line"><span class="lineno"> 415</span> <span class="keywordflow">while</span> (current_state != <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><span class="lineno"> 416</span> answer.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/emplace_back.html">emplace_back</a>(*current_state->state);</div>
|
||||
<div class="line"><span class="lineno"> 417</span> current_state = parent_of.find(current_state)->second;</div>
|
||||
<div class="line"><span class="lineno"> 418</span> }</div>
|
||||
<div class="line"><span class="lineno"> 419</span> <span class="keywordflow">return</span> answer;</div>
|
||||
<div class="line"><span class="lineno"> 420</span> }</div>
|
||||
<div class="ttc" id="aemplace_back_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/emplace_back.html">std::vector::emplace_back</a></div><div class="ttdeci">T emplace_back(T... args)</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
@@ -450,7 +456,7 @@ Here is the call graph for this function:</div>
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../d8/d77/namespacemachine__learning.html">machine_learning</a></li><li class="navelem"><b>aystar_search</b></li><li class="navelem"><a class="el" href="../../da/d02/classmachine__learning_1_1aystar__search_1_1_ay_star_search.html">AyStarSearch</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<map id="machine_learning::aystar_search::AyStarSearch::Solution" name="machine_learning::aystar_search::AyStarSearch::Solution">
|
||||
<area shape="rect" id="node1" title="A helper solution: launches when a solution for AyStarSearch is found." alt="" coords="5,16,172,72"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/emplace_back.html#" title=" " alt="" coords="220,5,396,32"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/map/find.html#" title=" " alt="" coords="257,56,359,83"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/emplace_back#" title=" " alt="" coords="220,5,396,32"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/map/find#" title=" " alt="" coords="257,56,359,83"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
fa104f62e0167a8f92371e84db46bd57
|
||||
92011cb893b3951d553b7529cf00a761
|
||||
@@ -23,7 +23,7 @@
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/emplace_back.html#" xlink:title=" ">
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/emplace_back#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="161,-38.5 161,-57.5 293,-57.5 293,-38.5 161,-38.5"/>
|
||||
<text text-anchor="middle" x="227" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::emplace_back</text>
|
||||
</a>
|
||||
@@ -38,7 +38,7 @@
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/map/find.html#" xlink:title=" ">
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/map/find#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="188.5,-0.5 188.5,-19.5 265.5,-19.5 265.5,-0.5 188.5,-0.5"/>
|
||||
<text text-anchor="middle" x="227" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::map::find</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
@@ -1,13 +1,13 @@
|
||||
<map id="machine_learning::aystar_search::AyStarSearch::a_star_search" name="machine_learning::aystar_search::AyStarSearch::a_star_search">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,193,172,249"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/set/begin.html#" title=" " alt="" coords="251,5,356,32"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/set/emplace.html#" title=" " alt="" coords="242,56,365,83"/>
|
||||
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/set/empty.html#" title=" " alt="" coords="248,107,359,133"/>
|
||||
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/set/end.html#" title=" " alt="" coords="256,157,351,184"/>
|
||||
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/map/end.html#" title=" " alt="" coords="252,208,355,235"/>
|
||||
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/set/erase.html#" title=" " alt="" coords="250,259,357,285"/>
|
||||
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/set/find.html#" title=" " alt="" coords="256,309,351,336"/>
|
||||
<area shape="rect" id="node9" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/map/find.html#" title=" " alt="" coords="471,368,574,395"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/set/begin#" title=" " alt="" coords="251,5,356,32"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/set/emplace#" title=" " alt="" coords="242,56,365,83"/>
|
||||
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/set/empty#" title=" " alt="" coords="248,107,359,133"/>
|
||||
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/set/end#" title=" " alt="" coords="256,157,351,184"/>
|
||||
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/map/end#" title=" " alt="" coords="252,208,355,235"/>
|
||||
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/set/erase#" title=" " alt="" coords="250,259,357,285"/>
|
||||
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/set/find#" title=" " alt="" coords="256,309,351,336"/>
|
||||
<area shape="rect" id="node9" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/map/find#" title=" " alt="" coords="471,368,574,395"/>
|
||||
<area shape="rect" id="node10" href="$da/d02/classmachine__learning_1_1aystar__search_1_1_ay_star_search.html#a0a26aa9ad3d73707370d9fe83707aca4" title="A helper solution: launches when a solution for AyStarSearch is found." alt="" coords="220,411,387,467"/>
|
||||
<area shape="rect" id="node11" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/emplace_back.html#" title=" " alt="" coords="435,425,611,452"/>
|
||||
<area shape="rect" id="node11" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/emplace_back#" title=" " alt="" coords="435,425,611,452"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
917ef1f6aec9dcbb1295ded3f018b12e
|
||||
a5507952063797991a67793209834842
|
||||
@@ -23,7 +23,7 @@
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/set/begin.html#" xlink:title=" ">
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/set/begin#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="184,-326.5 184,-345.5 263,-345.5 263,-326.5 184,-326.5"/>
|
||||
<text text-anchor="middle" x="223.5" y="-333.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::set::begin</text>
|
||||
</a>
|
||||
@@ -38,7 +38,7 @@
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/set/emplace.html#" xlink:title=" ">
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/set/emplace#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="177.5,-288.5 177.5,-307.5 269.5,-307.5 269.5,-288.5 177.5,-288.5"/>
|
||||
<text text-anchor="middle" x="223.5" y="-295.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::set::emplace</text>
|
||||
</a>
|
||||
@@ -53,7 +53,7 @@
|
||||
<!-- Node4 -->
|
||||
<g id="node4" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/set/empty.html#" xlink:title=" ">
|
||||
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/set/empty#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="182,-250.5 182,-269.5 265,-269.5 265,-250.5 182,-250.5"/>
|
||||
<text text-anchor="middle" x="223.5" y="-257.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::set::empty</text>
|
||||
</a>
|
||||
@@ -68,7 +68,7 @@
|
||||
<!-- Node5 -->
|
||||
<g id="node5" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/set/end.html#" xlink:title=" ">
|
||||
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/set/end#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="188,-212.5 188,-231.5 259,-231.5 259,-212.5 188,-212.5"/>
|
||||
<text text-anchor="middle" x="223.5" y="-219.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::set::end</text>
|
||||
</a>
|
||||
@@ -83,7 +83,7 @@
|
||||
<!-- Node6 -->
|
||||
<g id="node6" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/map/end.html#" xlink:title=" ">
|
||||
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/map/end#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="185,-174.5 185,-193.5 262,-193.5 262,-174.5 185,-174.5"/>
|
||||
<text text-anchor="middle" x="223.5" y="-181.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::map::end</text>
|
||||
</a>
|
||||
@@ -98,7 +98,7 @@
|
||||
<!-- Node7 -->
|
||||
<g id="node7" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/set/erase.html#" xlink:title=" ">
|
||||
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/set/erase#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="183.5,-136.5 183.5,-155.5 263.5,-155.5 263.5,-136.5 183.5,-136.5"/>
|
||||
<text text-anchor="middle" x="223.5" y="-143.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::set::erase</text>
|
||||
</a>
|
||||
@@ -113,7 +113,7 @@
|
||||
<!-- Node8 -->
|
||||
<g id="node8" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/set/find.html#" xlink:title=" ">
|
||||
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/set/find#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="188,-98.5 188,-117.5 259,-117.5 259,-98.5 188,-98.5"/>
|
||||
<text text-anchor="middle" x="223.5" y="-105.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::set::find</text>
|
||||
</a>
|
||||
@@ -128,7 +128,7 @@
|
||||
<!-- Node9 -->
|
||||
<g id="node9" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_node9"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/map/find.html#" xlink:title=" ">
|
||||
<g id="a_node9"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/map/find#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="349.5,-54.5 349.5,-73.5 426.5,-73.5 426.5,-54.5 349.5,-54.5"/>
|
||||
<text text-anchor="middle" x="388" y="-61.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::map::find</text>
|
||||
</a>
|
||||
@@ -166,7 +166,7 @@
|
||||
<!-- Node11 -->
|
||||
<g id="node11" class="node">
|
||||
<title>Node11</title>
|
||||
<g id="a_node11"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/emplace_back.html#" xlink:title=" ">
|
||||
<g id="a_node11"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/emplace_back#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="322,-11.5 322,-30.5 454,-30.5 454,-11.5 322,-11.5"/>
|
||||
<text text-anchor="middle" x="388" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::emplace_back</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 9.4 KiB |
Reference in New Issue
Block a user