Documentation for 2dadbf73f4

This commit is contained in:
github-actions
2024-02-12 20:07:08 +00:00
parent b5b4d78981
commit a1eb9bd385
1261 changed files with 30404 additions and 29974 deletions

View File

@@ -3,16 +3,18 @@
<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.8"/>
<meta name="generator" content="Doxygen 1.10.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: others/postfix_evaluation.cpp File Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="../../clipboard.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript" src="../../cookie.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
@@ -41,7 +43,7 @@ MathJax.Hub.Config({
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<!-- Generated by Doxygen 1.10.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
@@ -53,7 +55,7 @@ var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
$(function() { init_search(); });
});
/* @license-end */
</script>
@@ -71,7 +73,7 @@ $(function() {
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('d7/d75/postfix__evaluation_8cpp.html','../../'); initResizable(); });
$(function(){initNavTree('d7/d75/postfix__evaluation_8cpp.html','../../'); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
@@ -135,29 +137,29 @@ Namespaces</h2></td></tr>
</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:ad77f8c9cc594975756838d498c237cea" id="r_ad77f8c9cc594975756838d498c237cea"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d75/postfix__evaluation_8cpp.html#ad77f8c9cc594975756838d498c237cea">others::postfix_expression::push</a> (float operand, <a class="el" href="../../d5/d8a/classothers_1_1postfix__expression_1_1_stack.html">Stack</a> *<a class="el" href="../../d1/dc2/classstack.html">stack</a>)</td></tr>
<tr class="memitem:ad77f8c9cc594975756838d498c237cea" id="r_ad77f8c9cc594975756838d498c237cea"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ad77f8c9cc594975756838d498c237cea">others::postfix_expression::push</a> (float operand, <a class="el" href="../../d5/d8a/classothers_1_1postfix__expression_1_1_stack.html">Stack</a> *<a class="el" href="../../d1/dc2/classstack.html">stack</a>)</td></tr>
<tr class="memdesc:ad77f8c9cc594975756838d498c237cea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pushing operand, also called the number in the array to the stack. <br /></td></tr>
<tr class="separator:ad77f8c9cc594975756838d498c237cea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a421baa2002a64bc0bfc3e1b64800d734" id="r_a421baa2002a64bc0bfc3e1b64800d734"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d75/postfix__evaluation_8cpp.html#a421baa2002a64bc0bfc3e1b64800d734">others::postfix_expression::pop</a> (<a class="el" href="../../d5/d8a/classothers_1_1postfix__expression_1_1_stack.html">Stack</a> *<a class="el" href="../../d1/dc2/classstack.html">stack</a>)</td></tr>
<tr class="memitem:a421baa2002a64bc0bfc3e1b64800d734" id="r_a421baa2002a64bc0bfc3e1b64800d734"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a421baa2002a64bc0bfc3e1b64800d734">others::postfix_expression::pop</a> (<a class="el" href="../../d5/d8a/classothers_1_1postfix__expression_1_1_stack.html">Stack</a> *<a class="el" href="../../d1/dc2/classstack.html">stack</a>)</td></tr>
<tr class="memdesc:a421baa2002a64bc0bfc3e1b64800d734"><td class="mdescLeft">&#160;</td><td class="mdescRight">Popping operand, also called the number from the stack. <br /></td></tr>
<tr class="separator:a421baa2002a64bc0bfc3e1b64800d734"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4c27f949c9d6659be9f5bd2ccbe1360a" id="r_a4c27f949c9d6659be9f5bd2ccbe1360a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d75/postfix__evaluation_8cpp.html#a4c27f949c9d6659be9f5bd2ccbe1360a">others::postfix_expression::is_number</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &amp;s)</td></tr>
<tr class="memitem:a4c27f949c9d6659be9f5bd2ccbe1360a" id="r_a4c27f949c9d6659be9f5bd2ccbe1360a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a4c27f949c9d6659be9f5bd2ccbe1360a">others::postfix_expression::is_number</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &amp;s)</td></tr>
<tr class="memdesc:a4c27f949c9d6659be9f5bd2ccbe1360a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if scanned string is a number. <br /></td></tr>
<tr class="separator:a4c27f949c9d6659be9f5bd2ccbe1360a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a59fd597e0ea394abe027ced4d2ea3338" id="r_a59fd597e0ea394abe027ced4d2ea3338"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d75/postfix__evaluation_8cpp.html#a59fd597e0ea394abe027ced4d2ea3338">others::postfix_expression::evaluate</a> (float a, float b, const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &amp;operation, <a class="el" href="../../d5/d8a/classothers_1_1postfix__expression_1_1_stack.html">Stack</a> *<a class="el" href="../../d1/dc2/classstack.html">stack</a>)</td></tr>
<tr class="memitem:a59fd597e0ea394abe027ced4d2ea3338" id="r_a59fd597e0ea394abe027ced4d2ea3338"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a59fd597e0ea394abe027ced4d2ea3338">others::postfix_expression::evaluate</a> (float a, float b, const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &amp;operation, <a class="el" href="../../d5/d8a/classothers_1_1postfix__expression_1_1_stack.html">Stack</a> *<a class="el" href="../../d1/dc2/classstack.html">stack</a>)</td></tr>
<tr class="memdesc:a59fd597e0ea394abe027ced4d2ea3338"><td class="mdescLeft">&#160;</td><td class="mdescRight">Evaluate answer using given last two operands from and operation. <br /></td></tr>
<tr class="separator:a59fd597e0ea394abe027ced4d2ea3338"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae38bd3a177a6d61da3859a281233bbe1" id="r_ae38bd3a177a6d61da3859a281233bbe1"><td class="memTemplParams" colspan="2">template&lt;<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a> N&gt; </td></tr>
<tr class="memitem:ae38bd3a177a6d61da3859a281233bbe1"><td class="memTemplItemLeft" align="right" valign="top">float&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d7/d75/postfix__evaluation_8cpp.html#ae38bd3a177a6d61da3859a281233bbe1">others::postfix_expression::postfix_evaluation</a> (<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/string/basic_string.html">std::string</a>, N &gt; input)</td></tr>
<tr class="memitem:ae38bd3a177a6d61da3859a281233bbe1"><td class="memTemplItemLeft" align="right" valign="top">float&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="#ae38bd3a177a6d61da3859a281233bbe1">others::postfix_expression::postfix_evaluation</a> (<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/string/basic_string.html">std::string</a>, N &gt; input)</td></tr>
<tr class="memdesc:ae38bd3a177a6d61da3859a281233bbe1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Postfix Evaluation algorithm to compute the value from given input array. <br /></td></tr>
<tr class="separator:ae38bd3a177a6d61da3859a281233bbe1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6a8eeb7d346d5cd6335d9780fb7c0f15" id="r_a6a8eeb7d346d5cd6335d9780fb7c0f15"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d75/postfix__evaluation_8cpp.html#a6a8eeb7d346d5cd6335d9780fb7c0f15">test_function_1</a> ()</td></tr>
<tr class="memitem:a6a8eeb7d346d5cd6335d9780fb7c0f15" id="r_a6a8eeb7d346d5cd6335d9780fb7c0f15"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a6a8eeb7d346d5cd6335d9780fb7c0f15">test_function_1</a> ()</td></tr>
<tr class="memdesc:a6a8eeb7d346d5cd6335d9780fb7c0f15"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test function 1 with input array {'2', '3', '1', '*', '+', '9', '-'}. <br /></td></tr>
<tr class="separator:a6a8eeb7d346d5cd6335d9780fb7c0f15"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5b97d12e8b61484f756a8721992bfae1" id="r_a5b97d12e8b61484f756a8721992bfae1"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d75/postfix__evaluation_8cpp.html#a5b97d12e8b61484f756a8721992bfae1">test_function_2</a> ()</td></tr>
<tr class="memitem:a5b97d12e8b61484f756a8721992bfae1" id="r_a5b97d12e8b61484f756a8721992bfae1"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a5b97d12e8b61484f756a8721992bfae1">test_function_2</a> ()</td></tr>
<tr class="memdesc:a5b97d12e8b61484f756a8721992bfae1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test function 2 with input array {'1', '2', '+', '2', '/', '5', '*', '7', '+'}. <br /></td></tr>
<tr class="separator:a5b97d12e8b61484f756a8721992bfae1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4" id="r_ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d75/postfix__evaluation_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4" id="r_ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
<tr class="memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Main function. <br /></td></tr>
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
@@ -175,31 +177,22 @@ Functions</h2></td></tr>
<tr>
<td class="memname">void others::postfix_expression::evaluate </td>
<td>(</td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>a</em>, </td>
<td class="paramtype">float</td> <td class="paramname"><span class="paramname"><em>a</em>, </span></td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>b</em>, </td>
<td class="paramtype">float</td> <td class="paramname"><span class="paramname"><em>b</em>, </span></td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &amp;&#160;</td>
<td class="paramname"><em>operation</em>, </td>
<td class="paramtype">const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &amp;</td> <td class="paramname"><span class="paramname"><em>operation</em>, </span></td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="../../d5/d8a/classothers_1_1postfix__expression_1_1_stack.html">Stack</a> *&#160;</td>
<td class="paramname"><em>stack</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
<td class="paramtype"><a class="el" href="../../d5/d8a/classothers_1_1postfix__expression_1_1_stack.html">Stack</a> *</td> <td class="paramname"><span class="paramname"><em>stack</em></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
@@ -221,22 +214,22 @@ Functions</h2></td></tr>
<div class="line"><span class="lineno"> 80</span> <span class="keywordflow">switch</span> (*op) {</div>
<div class="line"><span class="lineno"> 81</span> <span class="keywordflow">case</span> <span class="charliteral">&#39;+&#39;</span>:</div>
<div class="line"><span class="lineno"> 82</span> c = a + b; <span class="comment">// Addition of numbers</span></div>
<div class="line"><span class="lineno"> 83</span> <a class="code hl_function" href="../../d7/d75/postfix__evaluation_8cpp.html#ad77f8c9cc594975756838d498c237cea">others::postfix_expression::push</a>(c, <a class="code hl_class" href="../../d1/dc2/classstack.html">stack</a>);</div>
<div class="line"><span class="lineno"> 83</span> <a class="code hl_function" href="#ad77f8c9cc594975756838d498c237cea">others::postfix_expression::push</a>(c, <a class="code hl_class" href="../../d1/dc2/classstack.html">stack</a>);</div>
<div class="line"><span class="lineno"> 84</span> <span class="keywordflow">break</span>;</div>
<div class="line"><span class="lineno"> 85</span> </div>
<div class="line"><span class="lineno"> 86</span> <span class="keywordflow">case</span> <span class="charliteral">&#39;-&#39;</span>:</div>
<div class="line"><span class="lineno"> 87</span> c = a - b; <span class="comment">// Subtraction of numbers</span></div>
<div class="line"><span class="lineno"> 88</span> <a class="code hl_function" href="../../d7/d75/postfix__evaluation_8cpp.html#ad77f8c9cc594975756838d498c237cea">others::postfix_expression::push</a>(c, <a class="code hl_class" href="../../d1/dc2/classstack.html">stack</a>);</div>
<div class="line"><span class="lineno"> 88</span> <a class="code hl_function" href="#ad77f8c9cc594975756838d498c237cea">others::postfix_expression::push</a>(c, <a class="code hl_class" href="../../d1/dc2/classstack.html">stack</a>);</div>
<div class="line"><span class="lineno"> 89</span> <span class="keywordflow">break</span>;</div>
<div class="line"><span class="lineno"> 90</span> </div>
<div class="line"><span class="lineno"> 91</span> <span class="keywordflow">case</span> <span class="charliteral">&#39;*&#39;</span>:</div>
<div class="line"><span class="lineno"> 92</span> c = a * b; <span class="comment">// Multiplication of numbers</span></div>
<div class="line"><span class="lineno"> 93</span> <a class="code hl_function" href="../../d7/d75/postfix__evaluation_8cpp.html#ad77f8c9cc594975756838d498c237cea">others::postfix_expression::push</a>(c, <a class="code hl_class" href="../../d1/dc2/classstack.html">stack</a>);</div>
<div class="line"><span class="lineno"> 93</span> <a class="code hl_function" href="#ad77f8c9cc594975756838d498c237cea">others::postfix_expression::push</a>(c, <a class="code hl_class" href="../../d1/dc2/classstack.html">stack</a>);</div>
<div class="line"><span class="lineno"> 94</span> <span class="keywordflow">break</span>;</div>
<div class="line"><span class="lineno"> 95</span> </div>
<div class="line"><span class="lineno"> 96</span> <span class="keywordflow">case</span> <span class="charliteral">&#39;/&#39;</span>:</div>
<div class="line"><span class="lineno"> 97</span> c = a / b; <span class="comment">// Division of numbers</span></div>
<div class="line"><span class="lineno"> 98</span> <a class="code hl_function" href="../../d7/d75/postfix__evaluation_8cpp.html#ad77f8c9cc594975756838d498c237cea">others::postfix_expression::push</a>(c, <a class="code hl_class" href="../../d1/dc2/classstack.html">stack</a>);</div>
<div class="line"><span class="lineno"> 98</span> <a class="code hl_function" href="#ad77f8c9cc594975756838d498c237cea">others::postfix_expression::push</a>(c, <a class="code hl_class" href="../../d1/dc2/classstack.html">stack</a>);</div>
<div class="line"><span class="lineno"> 99</span> <span class="keywordflow">break</span>;</div>
<div class="line"><span class="lineno"> 100</span> </div>
<div class="line"><span class="lineno"> 101</span> <span class="keywordflow">default</span>:</div>
@@ -247,7 +240,7 @@ Functions</h2></td></tr>
<div class="ttc" id="abasic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div></div>
<div class="ttc" id="ac_str_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string/c_str.html">std::string::c_str</a></div><div class="ttdeci">T c_str(T... args)</div></div>
<div class="ttc" id="aclassstack_html"><div class="ttname"><a href="../../d1/dc2/classstack.html">stack</a></div><div class="ttdoc">for std::invalid_argument</div><div class="ttdef"><b>Definition</b> stack.hpp:19</div></div>
<div class="ttc" id="apostfix__evaluation_8cpp_html_ad77f8c9cc594975756838d498c237cea"><div class="ttname"><a href="../../d7/d75/postfix__evaluation_8cpp.html#ad77f8c9cc594975756838d498c237cea">others::postfix_expression::push</a></div><div class="ttdeci">void push(float operand, Stack *stack)</div><div class="ttdoc">Pushing operand, also called the number in the array to the stack.</div><div class="ttdef"><b>Definition</b> postfix_evaluation.cpp:44</div></div>
<div class="ttc" id="apostfix__evaluation_8cpp_html_ad77f8c9cc594975756838d498c237cea"><div class="ttname"><a href="#ad77f8c9cc594975756838d498c237cea">others::postfix_expression::push</a></div><div class="ttdeci">void push(float operand, Stack *stack)</div><div class="ttdoc">Pushing operand, also called the number in the array to the stack.</div><div class="ttdef"><b>Definition</b> postfix_evaluation.cpp:44</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
@@ -265,8 +258,7 @@ Here is the call graph for this function:</div>
<tr>
<td class="memname">bool others::postfix_expression::is_number </td>
<td>(</td>
<td class="paramtype">const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &amp;&#160;</td>
<td class="paramname"><em>s</em></td><td>)</td>
<td class="paramtype">const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &amp;</td> <td class="paramname"><span class="paramname"><em>s</em></span></td><td>)</td>
<td></td>
</tr>
</table>
@@ -304,8 +296,7 @@ Here is the call graph for this function:</div>
<tr>
<td class="memname">int main </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td class="paramtype">void</td> <td class="paramname"><span class="paramname"></span></td><td>)</td>
<td></td>
</tr>
</table>
@@ -314,15 +305,15 @@ Here is the call graph for this function:</div>
<p>Main function. </p>
<dl class="section return"><dt>Returns</dt><dd>0 on exit </dd></dl>
<div class="fragment"><div class="line"><span class="lineno"> 171</span> {</div>
<div class="line"><span class="lineno"> 172</span> <a class="code hl_function" href="../../d7/d75/postfix__evaluation_8cpp.html#a6a8eeb7d346d5cd6335d9780fb7c0f15">test_function_1</a>();</div>
<div class="line"><span class="lineno"> 173</span> <a class="code hl_function" href="../../d7/d75/postfix__evaluation_8cpp.html#a5b97d12e8b61484f756a8721992bfae1">test_function_2</a>();</div>
<div class="line"><span class="lineno"> 172</span> <a class="code hl_function" href="#a6a8eeb7d346d5cd6335d9780fb7c0f15">test_function_1</a>();</div>
<div class="line"><span class="lineno"> 173</span> <a class="code hl_function" href="#a5b97d12e8b61484f756a8721992bfae1">test_function_2</a>();</div>
<div class="line"><span class="lineno"> 174</span> </div>
<div class="line"><span class="lineno"> 175</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;\nTest implementations passed!\n&quot;</span>;</div>
<div class="line"><span class="lineno"> 176</span> </div>
<div class="line"><span class="lineno"> 177</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><span class="lineno"> 178</span>}</div>
<div class="ttc" id="apostfix__evaluation_8cpp_html_a5b97d12e8b61484f756a8721992bfae1"><div class="ttname"><a href="../../d7/d75/postfix__evaluation_8cpp.html#a5b97d12e8b61484f756a8721992bfae1">test_function_2</a></div><div class="ttdeci">static void test_function_2()</div><div class="ttdoc">Test function 2 with input array {'1', '2', '+', '2', '/', '5', '*', '7', '+'}.</div><div class="ttdef"><b>Definition</b> postfix_evaluation.cpp:159</div></div>
<div class="ttc" id="apostfix__evaluation_8cpp_html_a6a8eeb7d346d5cd6335d9780fb7c0f15"><div class="ttname"><a href="../../d7/d75/postfix__evaluation_8cpp.html#a6a8eeb7d346d5cd6335d9780fb7c0f15">test_function_1</a></div><div class="ttdeci">static void test_function_1()</div><div class="ttdoc">Test function 1 with input array {'2', '3', '1', '*', '+', '9', '-'}.</div><div class="ttdef"><b>Definition</b> postfix_evaluation.cpp:146</div></div>
<div class="ttc" id="apostfix__evaluation_8cpp_html_a5b97d12e8b61484f756a8721992bfae1"><div class="ttname"><a href="#a5b97d12e8b61484f756a8721992bfae1">test_function_2</a></div><div class="ttdeci">static void test_function_2()</div><div class="ttdoc">Test function 2 with input array {'1', '2', '+', '2', '/', '5', '*', '7', '+'}.</div><div class="ttdef"><b>Definition</b> postfix_evaluation.cpp:159</div></div>
<div class="ttc" id="apostfix__evaluation_8cpp_html_a6a8eeb7d346d5cd6335d9780fb7c0f15"><div class="ttname"><a href="#a6a8eeb7d346d5cd6335d9780fb7c0f15">test_function_1</a></div><div class="ttdeci">static void test_function_1()</div><div class="ttdoc">Test function 1 with input array {'2', '3', '1', '*', '+', '9', '-'}.</div><div class="ttdef"><b>Definition</b> postfix_evaluation.cpp:146</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
@@ -340,8 +331,7 @@ Here is the call graph for this function:</div>
<tr>
<td class="memname">float others::postfix_expression::pop </td>
<td>(</td>
<td class="paramtype"><a class="el" href="../../d5/d8a/classothers_1_1postfix__expression_1_1_stack.html">Stack</a> *&#160;</td>
<td class="paramname"><em>stack</em></td><td>)</td>
<td class="paramtype"><a class="el" href="../../d5/d8a/classothers_1_1postfix__expression_1_1_stack.html">Stack</a> *</td> <td class="paramname"><span class="paramname"><em>stack</em></span></td><td>)</td>
<td></td>
</tr>
</table>
@@ -375,8 +365,7 @@ template&lt;<a class="elRef" target="_blank" href="http://en.cppreference.com/w/
<tr>
<td class="memname">float others::postfix_expression::postfix_evaluation </td>
<td>(</td>
<td class="paramtype"><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/string/basic_string.html">std::string</a>, N &gt;&#160;</td>
<td class="paramname"><em>input</em></td><td>)</td>
<td class="paramtype"><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/string/basic_string.html">std::string</a>, N &gt;</td> <td class="paramname"><span class="paramname"><em>input</em></span></td><td>)</td>
<td></td>
</tr>
</table>
@@ -409,7 +398,7 @@ template&lt;<a class="elRef" target="_blank" href="http://en.cppreference.com/w/
<div class="line"><span class="lineno"> 125</span> <span class="keywordtype">float</span> op2 = pop(&amp;<a class="code hl_class" href="../../d1/dc2/classstack.html">stack</a>);</div>
<div class="line"><span class="lineno"> 126</span> <span class="keywordtype">float</span> op1 = pop(&amp;<a class="code hl_class" href="../../d1/dc2/classstack.html">stack</a>);</div>
<div class="line"><span class="lineno"> 127</span> </div>
<div class="line"><span class="lineno"> 128</span> <a class="code hl_function" href="../../d7/d75/postfix__evaluation_8cpp.html#a59fd597e0ea394abe027ced4d2ea3338">evaluate</a>(op1, op2, scan, &amp;<a class="code hl_class" href="../../d1/dc2/classstack.html">stack</a>);</div>
<div class="line"><span class="lineno"> 128</span> <a class="code hl_function" href="#a59fd597e0ea394abe027ced4d2ea3338">evaluate</a>(op1, op2, scan, &amp;<a class="code hl_class" href="../../d1/dc2/classstack.html">stack</a>);</div>
<div class="line"><span class="lineno"> 129</span> }</div>
<div class="line"><span class="lineno"> 130</span> j++;</div>
<div class="line"><span class="lineno"> 131</span> }</div>
@@ -420,7 +409,7 @@ template&lt;<a class="elRef" target="_blank" href="http://en.cppreference.com/w/
<div class="line"><span class="lineno"> 136</span>}</div>
<div class="ttc" id="abasic_string_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a></div></div>
<div class="ttc" id="amemory__game_8cpp_html_a33167bb9cce6d527b478b4f6ae8c3f59"><div class="ttname"><a href="../../dd/d92/memory__game_8cpp.html#a33167bb9cce6d527b478b4f6ae8c3f59">games::memory_game::is_number</a></div><div class="ttdeci">bool is_number(const T &amp;input)</div><div class="ttdoc">Utility function to verify if the given input is a number or not. This is very useful to prevent the ...</div><div class="ttdef"><b>Definition</b> memory_game.cpp:62</div></div>
<div class="ttc" id="apostfix__evaluation_8cpp_html_a59fd597e0ea394abe027ced4d2ea3338"><div class="ttname"><a href="../../d7/d75/postfix__evaluation_8cpp.html#a59fd597e0ea394abe027ced4d2ea3338">others::postfix_expression::evaluate</a></div><div class="ttdeci">void evaluate(float a, float b, const std::string &amp;operation, Stack *stack)</div><div class="ttdoc">Evaluate answer using given last two operands from and operation.</div><div class="ttdef"><b>Definition</b> postfix_evaluation.cpp:77</div></div>
<div class="ttc" id="apostfix__evaluation_8cpp_html_a59fd597e0ea394abe027ced4d2ea3338"><div class="ttname"><a href="#a59fd597e0ea394abe027ced4d2ea3338">others::postfix_expression::evaluate</a></div><div class="ttdeci">void evaluate(float a, float b, const std::string &amp;operation, Stack *stack)</div><div class="ttdoc">Evaluate answer using given last two operands from and operation.</div><div class="ttdef"><b>Definition</b> postfix_evaluation.cpp:77</div></div>
<div class="ttc" id="astof_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string/stof.html">std::stof</a></div><div class="ttdeci">T stof(T... args)</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
@@ -439,19 +428,12 @@ Here is the call graph for this function:</div>
<tr>
<td class="memname">void others::postfix_expression::push </td>
<td>(</td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>operand</em>, </td>
<td class="paramtype">float</td> <td class="paramname"><span class="paramname"><em>operand</em>, </span></td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="../../d5/d8a/classothers_1_1postfix__expression_1_1_stack.html">Stack</a> *&#160;</td>
<td class="paramname"><em>stack</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
<td class="paramtype"><a class="el" href="../../d5/d8a/classothers_1_1postfix__expression_1_1_stack.html">Stack</a> *</td> <td class="paramname"><span class="paramname"><em>stack</em></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
@@ -484,7 +466,7 @@ Here is the call graph for this function:</div>
<tr>
<td class="memname">static void test_function_1 </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td class="paramname"><span class="paramname"></span></td><td>)</td>
<td></td>
</tr>
</table>
@@ -500,12 +482,12 @@ Here is the call graph for this function:</div>
<div class="fragment"><div class="line"><span class="lineno"> 146</span> {</div>
<div class="line"><span class="lineno"> 147</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array&lt;std::string, 7&gt;</a> input = {<span class="stringliteral">&quot;2&quot;</span>, <span class="stringliteral">&quot;3&quot;</span>, <span class="stringliteral">&quot;1&quot;</span>, <span class="stringliteral">&quot;*&quot;</span>, <span class="stringliteral">&quot;+&quot;</span>, <span class="stringliteral">&quot;9&quot;</span>, <span class="stringliteral">&quot;-&quot;</span>};</div>
<div class="line"><span class="lineno"> 148</span> </div>
<div class="line"><span class="lineno"> 149</span> <span class="keywordtype">float</span> answer = <a class="code hl_function" href="../../d7/d75/postfix__evaluation_8cpp.html#ae38bd3a177a6d61da3859a281233bbe1">others::postfix_expression::postfix_evaluation</a>(input);</div>
<div class="line"><span class="lineno"> 149</span> <span class="keywordtype">float</span> answer = <a class="code hl_function" href="#ae38bd3a177a6d61da3859a281233bbe1">others::postfix_expression::postfix_evaluation</a>(input);</div>
<div class="line"><span class="lineno"> 150</span> </div>
<div class="line"><span class="lineno"> 151</span> assert(answer == -4);</div>
<div class="line"><span class="lineno"> 152</span>}</div>
<div class="ttc" id="aarray_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/array.html">std::array</a></div></div>
<div class="ttc" id="apostfix__evaluation_8cpp_html_ae38bd3a177a6d61da3859a281233bbe1"><div class="ttname"><a href="../../d7/d75/postfix__evaluation_8cpp.html#ae38bd3a177a6d61da3859a281233bbe1">others::postfix_expression::postfix_evaluation</a></div><div class="ttdeci">float postfix_evaluation(std::array&lt; std::string, N &gt; input)</div><div class="ttdoc">Postfix Evaluation algorithm to compute the value from given input array.</div><div class="ttdef"><b>Definition</b> postfix_evaluation.cpp:115</div></div>
<div class="ttc" id="apostfix__evaluation_8cpp_html_ae38bd3a177a6d61da3859a281233bbe1"><div class="ttname"><a href="#ae38bd3a177a6d61da3859a281233bbe1">others::postfix_expression::postfix_evaluation</a></div><div class="ttdeci">float postfix_evaluation(std::array&lt; std::string, N &gt; input)</div><div class="ttdoc">Postfix Evaluation algorithm to compute the value from given input array.</div><div class="ttdef"><b>Definition</b> postfix_evaluation.cpp:115</div></div>
</div><!-- fragment -->
</div>
</div>
@@ -521,7 +503,7 @@ Here is the call graph for this function:</div>
<tr>
<td class="memname">static void test_function_2 </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td class="paramname"><span class="paramname"></span></td><td>)</td>
<td></td>
</tr>
</table>
@@ -537,7 +519,7 @@ Here is the call graph for this function:</div>
<div class="fragment"><div class="line"><span class="lineno"> 159</span> {</div>
<div class="line"><span class="lineno"> 160</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array&lt;std::string, 9&gt;</a> input = {<span class="stringliteral">&quot;100&quot;</span>, <span class="stringliteral">&quot;200&quot;</span>, <span class="stringliteral">&quot;+&quot;</span>, <span class="stringliteral">&quot;2&quot;</span>, <span class="stringliteral">&quot;/&quot;</span>,</div>
<div class="line"><span class="lineno"> 161</span> <span class="stringliteral">&quot;5&quot;</span>, <span class="stringliteral">&quot;*&quot;</span>, <span class="stringliteral">&quot;7&quot;</span>, <span class="stringliteral">&quot;+&quot;</span>};</div>
<div class="line"><span class="lineno"> 162</span> <span class="keywordtype">float</span> answer = <a class="code hl_function" href="../../d7/d75/postfix__evaluation_8cpp.html#ae38bd3a177a6d61da3859a281233bbe1">others::postfix_expression::postfix_evaluation</a>(input);</div>
<div class="line"><span class="lineno"> 162</span> <span class="keywordtype">float</span> answer = <a class="code hl_function" href="#ae38bd3a177a6d61da3859a281233bbe1">others::postfix_expression::postfix_evaluation</a>(input);</div>
<div class="line"><span class="lineno"> 163</span> </div>
<div class="line"><span class="lineno"> 164</span> assert(answer == 757);</div>
<div class="line"><span class="lineno"> 165</span>}</div>
@@ -550,7 +532,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="../../dir_9510827d0b234b3cc54b29892f217477.html">others</a></li><li class="navelem"><a class="el" href="../../d7/d75/postfix__evaluation_8cpp.html">postfix_evaluation.cpp</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.8 </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.10.0 </li>
</ul>
</div>
</body>