Skip to content

Commit

Permalink
Documentation for c84c7da
Browse files Browse the repository at this point in the history
  • Loading branch information
realstealthninja committed Aug 31, 2024
1 parent 20cd9a9 commit 50a7a35
Show file tree
Hide file tree
Showing 69 changed files with 885 additions and 943 deletions.
48 changes: 48 additions & 0 deletions d2/d90/namespacegreedy__algorithms.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a33e3819aa9ffec0e380383c52603b502" id="r_a33e3819aa9ffec0e380383c52603b502"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a33e3819aa9ffec0e380383c52603b502">can_jump</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; int &gt; &amp;nums)</td></tr>
<tr class="memdesc:a33e3819aa9ffec0e380383c52603b502"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks whether the given element (default is <code>1</code>) can jump to the last index. <br /></td></tr>
<tr class="separator:a33e3819aa9ffec0e380383c52603b502"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a127ce4403660032f53ae2e6467e5427d" id="r_a127ce4403660032f53ae2e6467e5427d"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:a127ce4403660032f53ae2e6467e5427d"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="#a127ce4403660032f53ae2e6467e5427d">findMinimumEdge</a> (const int &amp;infinity, const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array</a>&lt; <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array</a>&lt; T, 6 &gt;, 6 &gt; &amp;graph)</td></tr>
<tr class="memdesc:a127ce4403660032f53ae2e6467e5427d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Finds the minimum edge of the given graph. <br /></td></tr>
Expand All @@ -132,9 +135,54 @@
<p>for IO operations</p>
<p>for assert for INT_MAX for IO operations</p>
<p>Greedy Algorithms</p>
<p>for assert for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></p>
<p>Greedy Algorithms</p>
<p>for array</p>
<p>Greedy Algorithms </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a33e3819aa9ffec0e380383c52603b502" name="a33e3819aa9ffec0e380383c52603b502"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a33e3819aa9ffec0e380383c52603b502">&#9670;&#160;</a></span>can_jump()</h2>

<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool greedy_algorithms::can_jump </td>
<td>(</td>
<td class="paramtype">const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; int &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>nums</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">

<p>Checks whether the given element (default is <code>1</code>) can jump to the last index. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">nums</td><td>array of numbers containing the maximum jump (in steps) from that index </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the index can be reached </dd>
<dd>
false if the index can NOT be reached </dd></dl>
<div class="fragment"><div class="line"><span class="lineno"> 42</span> {</div>
<div class="line"><span class="lineno"> 43</span> <span class="keywordtype">size_t</span> lastPos = nums.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>() - 1;</div>
<div class="line"><span class="lineno"> 44</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = lastPos; i != <span class="keyword">static_cast&lt;</span><span class="keywordtype">size_t</span><span class="keyword">&gt;</span>(-1); i--) {</div>
<div class="line"><span class="lineno"> 45</span> <span class="keywordflow">if</span> (i + nums[i] &gt;= lastPos) {</div>
<div class="line"><span class="lineno"> 46</span> lastPos = i;</div>
<div class="line"><span class="lineno"> 47</span> }</div>
<div class="line"><span class="lineno"> 48</span> }</div>
<div class="line"><span class="lineno"> 49</span> <span class="keywordflow">return</span> lastPos == 0;</div>
<div class="line"><span class="lineno"> 50</span>}</div>
<div class="ttc" id="asize_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/size.html">std::vector::size</a></div><div class="ttdeci">T size(T... args)</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d2/d90/namespacegreedy__algorithms_a33e3819aa9ffec0e380383c52603b502_cgraph.svg" width="310" height="52"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>

</div>
</div>
<a id="a127ce4403660032f53ae2e6467e5427d" name="a127ce4403660032f53ae2e6467e5427d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a127ce4403660032f53ae2e6467e5427d">&#9670;&#160;</a></span>findMinimumEdge()</h2>

Expand Down
1 change: 1 addition & 0 deletions d2/d90/namespacegreedy__algorithms.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
var namespacegreedy__algorithms =
[
[ "dijkstra", "d2/d2f/namespacegreedy__algorithms_1_1dijkstra.html", "d2/d2f/namespacegreedy__algorithms_1_1dijkstra" ],
[ "can_jump", "d2/d90/namespacegreedy__algorithms.html#a33e3819aa9ffec0e380383c52603b502", null ],
[ "findMinimumEdge", "d2/d90/namespacegreedy__algorithms.html#a127ce4403660032f53ae2e6467e5427d", null ]
];
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<map id="greedy_algorithms::can_jump" name="greedy_algorithms::can_jump">
<area shape="rect" id="Node000001" title="Checks whether the given element (default is 1) can jump to the last index." alt="" coords="5,5,141,46"/>
<area shape="rect" id="Node000002" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="189,13,304,38"/>
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="141,23,173,23,173,28,141,28"/>
</map>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c42fb8e2aa1ecbda76282b1d15466f0d
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions d5/d79/jump__game_8cpp__incl.map
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<map id="greedy_algorithms/jump_game.cpp" name="greedy_algorithms/jump_game.cpp">
<area shape="rect" id="Node000001" title="Jumping Game algorithm implementation" alt="" coords="50,5,209,46"/>
<area shape="rect" id="Node000002" title=" " alt="" coords="5,94,70,120"/>
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="108,48,65,86,61,82,105,44"/>
<area shape="rect" id="Node000003" title=" " alt="" coords="94,94,165,120"/>
<area shape="poly" id="edge2_Node000001_Node000003" title=" " alt="" coords="132,46,132,78,127,78,127,46"/>
<area shape="rect" id="Node000004" title=" " alt="" coords="189,94,246,120"/>
<area shape="poly" id="edge3_Node000001_Node000004" title=" " alt="" coords="153,44,194,81,191,85,149,48"/>
</map>
1 change: 1 addition & 0 deletions d5/d79/jump__game_8cpp__incl.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
becd4ae2f466d04a1ba167e3d07a4053
41 changes: 21 additions & 20 deletions d8/df6/jumpgame_8cpp__incl.svg → d5/d79/jump__game_8cpp__incl.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 50a7a35

Please sign in to comment.