Documentation for bcf79e259a

This commit is contained in:
github-actions
2020-09-30 18:54:19 +00:00
parent a387c2ff98
commit a5b08234aa
278 changed files with 7234 additions and 5294 deletions

View File

@@ -0,0 +1,570 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.20"/>
<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>
<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>
<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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML/MathJax.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Algorithms_in_C++
&#160;<span id="projectnumber">1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.20 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('d7/d75/postfix__evaluation_8cpp.html','../../'); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#namespaces">Namespaces</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">postfix_evaluation.cpp File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Evaluation of <a href="https://en.wikipedia.org/wiki/Reverse_Polish_notation">Postfix Expression</a>
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;algorithm&gt;</code><br />
<code>#include &lt;array&gt;</code><br />
<code>#include &lt;cassert&gt;</code><br />
<code>#include &lt;iostream&gt;</code><br />
<code>#include &lt;string&gt;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for postfix_evaluation.cpp:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d5/dc8/postfix__evaluation_8cpp__incl.svg" width="427" height="112"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d8a/classothers_1_1postfix__expression_1_1_stack.html">others::postfix_expression::Stack</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates an array to be used as stack for storing values. <a href="../../d5/d8a/classothers_1_1postfix__expression_1_1_stack.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:d0/d6f/namespaceothers"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d6f/namespaceothers.html">others</a></td></tr>
<tr class="memdesc:d0/d6f/namespaceothers"><td class="mdescLeft">&#160;</td><td class="mdescRight">Other algorithms. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:d4/de6/namespacepostfix__expression"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/de6/namespacepostfix__expression.html">postfix_expression</a></td></tr>
<tr class="memdesc:d4/de6/namespacepostfix__expression"><td class="mdescLeft">&#160;</td><td class="mdescRight">Functions for Postfix Expression algorithm. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem: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, Stack *<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. <a href="../../d7/d75/postfix__evaluation_8cpp.html#ad77f8c9cc594975756838d498c237cea">More...</a><br /></td></tr>
<tr class="separator:ad77f8c9cc594975756838d498c237cea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem: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> (Stack *<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. <a href="../../d7/d75/postfix__evaluation_8cpp.html#a421baa2002a64bc0bfc3e1b64800d734">More...</a><br /></td></tr>
<tr class="separator:a421baa2002a64bc0bfc3e1b64800d734"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem: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="memdesc:a4c27f949c9d6659be9f5bd2ccbe1360a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if scanned string is a number. <a href="../../d7/d75/postfix__evaluation_8cpp.html#a4c27f949c9d6659be9f5bd2ccbe1360a">More...</a><br /></td></tr>
<tr class="separator:a4c27f949c9d6659be9f5bd2ccbe1360a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem: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, Stack *<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. <a href="../../d7/d75/postfix__evaluation_8cpp.html#a59fd597e0ea394abe027ced4d2ea3338">More...</a><br /></td></tr>
<tr class="separator:a59fd597e0ea394abe027ced4d2ea3338"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae38bd3a177a6d61da3859a281233bbe1"><td class="memTemplParams" colspan="2">template&lt;std::size_t 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="memdesc:ae38bd3a177a6d61da3859a281233bbe1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Postfix Evaluation algorithm to compute the value from given input array. <a href="../../d7/d75/postfix__evaluation_8cpp.html#ae38bd3a177a6d61da3859a281233bbe1">More...</a><br /></td></tr>
<tr class="separator:ae38bd3a177a6d61da3859a281233bbe1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem: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="memdesc:a6a8eeb7d346d5cd6335d9780fb7c0f15"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test function 1 with input array {'2', '3', '1', '*', '+', '9', '-'}. <a href="../../d7/d75/postfix__evaluation_8cpp.html#a6a8eeb7d346d5cd6335d9780fb7c0f15">More...</a><br /></td></tr>
<tr class="separator:a6a8eeb7d346d5cd6335d9780fb7c0f15"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem: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="memdesc:a5b97d12e8b61484f756a8721992bfae1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test function 2 with input array {'1', '2', '+', '2', '/', '5', '*', '7', '+'}. <a href="../../d7/d75/postfix__evaluation_8cpp.html#a5b97d12e8b61484f756a8721992bfae1">More...</a><br /></td></tr>
<tr class="separator:a5b97d12e8b61484f756a8721992bfae1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem: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="memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Main function. <a href="../../d7/d75/postfix__evaluation_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">More...</a><br /></td></tr>
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Evaluation of <a href="https://en.wikipedia.org/wiki/Reverse_Polish_notation">Postfix Expression</a> </p>
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/Darshana-Sarma">Darshana Sarma</a> Create a stack to store operands (or values). Scan the given expression and do following for every scanned element. If the element is a number, push it into the stack If the element is a operator, pop operands for the operator from stack. Evaluate the operator and push the result back to the stack When the expression is ended, the number in the stack is the final answer </dd></dl>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a59fd597e0ea394abe027ced4d2ea3338"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a59fd597e0ea394abe027ced4d2ea3338">&#9670;&nbsp;</a></span>evaluate()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<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>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>b</em>, </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>
</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>
</tr>
</table>
</div><div class="memdoc">
<p>Evaluate answer using given last two operands from and operation. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">a</td><td>second last added operand which will be used for evaluation </td></tr>
<tr><td class="paramname">b</td><td>last added operand which will be used for evaluation </td></tr>
<tr><td class="paramname">operation</td><td>to be performed with respective floats </td></tr>
<tr><td class="paramname">stack</td><td>containing numbers </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>none </dd></dl>
<div class="fragment"><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; {</div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; <span class="keywordtype">float</span> c = 0;</div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span> *op = operation.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/c_str.html">c_str</a>();</div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; <span class="keywordflow">switch</span> (*op) {</div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; <span class="keywordflow">case</span> <span class="charliteral">&#39;+&#39;</span>:</div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; c = a + b; <span class="comment">// Addition of numbers</span></div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; <a class="code" href="../../dc/dc5/paranthesis__matching_8cpp.html#aae41c72130114bf31204cde6873b6095">others::postfix_expression::push</a>(c, <a class="code" href="../../d1/dc2/classstack.html">stack</a>);</div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; </div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; <span class="keywordflow">case</span> <span class="charliteral">&#39;-&#39;</span>:</div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; c = a - b; <span class="comment">// Subtraction of numbers</span></div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; <a class="code" href="../../dc/dc5/paranthesis__matching_8cpp.html#aae41c72130114bf31204cde6873b6095">others::postfix_expression::push</a>(c, <a class="code" href="../../d1/dc2/classstack.html">stack</a>);</div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; </div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; <span class="keywordflow">case</span> <span class="charliteral">&#39;*&#39;</span>:</div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; c = a * b; <span class="comment">// Multiplication of numbers</span></div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <a class="code" href="../../dc/dc5/paranthesis__matching_8cpp.html#aae41c72130114bf31204cde6873b6095">others::postfix_expression::push</a>(c, <a class="code" href="../../d1/dc2/classstack.html">stack</a>);</div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; </div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; <span class="keywordflow">case</span> <span class="charliteral">&#39;/&#39;</span>:</div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; c = a / b; <span class="comment">// Division of numbers</span></div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; <a class="code" href="../../dc/dc5/paranthesis__matching_8cpp.html#aae41c72130114bf31204cde6873b6095">others::postfix_expression::push</a>(c, <a class="code" href="../../d1/dc2/classstack.html">stack</a>);</div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; </div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; <span class="keywordflow">default</span>:</div>
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Operator not defined\n&quot;</span>;</div>
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; }</div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160;}</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="../../d7/d75/postfix__evaluation_8cpp_a59fd597e0ea394abe027ced4d2ea3338_cgraph.svg" width="351" height="95"><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="a4c27f949c9d6659be9f5bd2ccbe1360a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4c27f949c9d6659be9f5bd2ccbe1360a">&#9670;&nbsp;</a></span>is_number()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<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></td>
</tr>
</table>
</div><div class="memdoc">
<p>Checks if scanned string is a number. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">s</td><td>scanned string </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>bool boolean value if string is number </dd></dl>
<div class="fragment"><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; {</div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; <span class="keywordflow">return</span> !s.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/empty.html">empty</a>() &amp;&amp; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/all_any_none_of.html">std::all_of</a>(s.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/begin.html">begin</a>(), s.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/end.html">end</a>(), ::isdigit);</div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160;}</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="../../d7/d75/postfix__evaluation_8cpp_a4c27f949c9d6659be9f5bd2ccbe1360a_cgraph.svg" width="358" height="190"><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="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">&#9670;&nbsp;</a></span>main()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int main </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Main function. </p>
<dl class="section return"><dt>Returns</dt><dd>0 on exit </dd></dl>
<div class="fragment"><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; {</div>
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; <a class="code" href="../../d7/d75/postfix__evaluation_8cpp.html#a6a8eeb7d346d5cd6335d9780fb7c0f15">test_function_1</a>();</div>
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160; <a class="code" href="../../d7/d75/postfix__evaluation_8cpp.html#a5b97d12e8b61484f756a8721992bfae1">test_function_2</a>();</div>
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160; </div>
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; <a class="codeRef" 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"><a name="l00176"></a><span class="lineno"> 176</span>&#160; </div>
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160;}</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="../../d7/d75/postfix__evaluation_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg" width="220" height="88"><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="a421baa2002a64bc0bfc3e1b64800d734"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a421baa2002a64bc0bfc3e1b64800d734">&#9670;&nbsp;</a></span>pop()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<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></td>
</tr>
</table>
</div><div class="memdoc">
<p>Popping operand, also called the number from the stack. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">stack</td><td>stack containing numbers </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>operand float on top of stack </dd></dl>
<div class="fragment"><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; {</div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; <span class="keywordtype">float</span> operand = <a class="code" href="../../d1/dc2/classstack.html">stack</a>-&gt;<a class="code" href="../../d1/dc2/classstack.html#a5b64337ec34b12e98458bb9b9d5f8f83">stack</a>[<a class="code" href="../../d1/dc2/classstack.html">stack</a>-&gt;<a class="code" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a>];</div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; <a class="code" href="../../d1/dc2/classstack.html">stack</a>-&gt;<a class="code" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a>--;</div>
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; <span class="keywordflow">return</span> operand;</div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;}</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="../../d7/d75/postfix__evaluation_8cpp_a421baa2002a64bc0bfc3e1b64800d734_cgraph.svg" width="358" height="38"><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="ae38bd3a177a6d61da3859a281233bbe1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae38bd3a177a6d61da3859a281233bbe1">&#9670;&nbsp;</a></span>postfix_evaluation()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;std::size_t N&gt; </div>
<table class="memname">
<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></td>
</tr>
</table>
</div><div class="memdoc">
<p>Postfix Evaluation algorithm to compute the value from given input array. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">N</td><td>number of array size </td></tr>
</table>
</dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">input</td><td>Array of characters consisting of numbers and operations </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>stack[stackTop] returns the top value from the stack </dd></dl>
<div class="fragment"><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; {</div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; Stack <a class="code" href="../../dc/dc5/paranthesis__matching_8cpp.html#aa37d24a036d239b3b528f13b9de880c7">stack</a>;</div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; <span class="keywordtype">int</span> j = 0;</div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; </div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; <span class="keywordflow">while</span> (j &lt; N) {</div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> scan = input[j];</div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; <span class="keywordflow">if</span> (<a class="code" href="../../d7/d75/postfix__evaluation_8cpp.html#a4c27f949c9d6659be9f5bd2ccbe1360a">is_number</a>(scan)) {</div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; <a class="code" href="../../dc/dc5/paranthesis__matching_8cpp.html#aae41c72130114bf31204cde6873b6095">push</a>(<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/stof.html">std::stof</a>(scan), &amp;<a class="code" href="../../d1/dc2/classstack.html">stack</a>);</div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; </div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; <span class="keywordtype">float</span> op2 = <a class="code" href="../../dc/dc5/paranthesis__matching_8cpp.html#a6d25c7dfbfeb52c3cb9d1b56ab49b664">pop</a>(&amp;<a class="code" href="../../d1/dc2/classstack.html">stack</a>);</div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; <span class="keywordtype">float</span> op1 = <a class="code" href="../../dc/dc5/paranthesis__matching_8cpp.html#a6d25c7dfbfeb52c3cb9d1b56ab49b664">pop</a>(&amp;<a class="code" href="../../d1/dc2/classstack.html">stack</a>);</div>
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; </div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; <a class="code" href="../../d7/d75/postfix__evaluation_8cpp.html#a59fd597e0ea394abe027ced4d2ea3338">evaluate</a>(op1, op2, scan, &amp;<a class="code" href="../../d1/dc2/classstack.html">stack</a>);</div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; }</div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; j++;</div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; }</div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; </div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <a class="code" href="../../d1/dc2/classstack.html">stack</a>.<a class="code" href="../../d1/dc2/classstack.html#a5b64337ec34b12e98458bb9b9d5f8f83">stack</a>[<a class="code" href="../../d1/dc2/classstack.html">stack</a>.<a class="code" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a>] &lt;&lt; <span class="stringliteral">&quot;\n&quot;</span>;</div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; </div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d1/dc2/classstack.html">stack</a>.<a class="code" href="../../d1/dc2/classstack.html#a5b64337ec34b12e98458bb9b9d5f8f83">stack</a>[<a class="code" href="../../d1/dc2/classstack.html">stack</a>.<a class="code" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a>];</div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160;}</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="../../d7/d75/postfix__evaluation_8cpp_ae38bd3a177a6d61da3859a281233bbe1_cgraph.svg" width="580" height="371"><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="ad77f8c9cc594975756838d498c237cea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad77f8c9cc594975756838d498c237cea">&#9670;&nbsp;</a></span>push()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<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>
</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>
</tr>
</table>
</div><div class="memdoc">
<p>Pushing operand, also called the number in the array to the stack. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">operand</td><td>float value from the input array or evaluation </td></tr>
<tr><td class="paramname">stack</td><td>stack containing numbers </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>none </dd></dl>
<div class="fragment"><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; {</div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; <a class="code" href="../../d1/dc2/classstack.html">stack</a>-&gt;<a class="code" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a>++;</div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; <a class="code" href="../../d1/dc2/classstack.html">stack</a>-&gt;<a class="code" href="../../d1/dc2/classstack.html#a5b64337ec34b12e98458bb9b9d5f8f83">stack</a>[<a class="code" href="../../d1/dc2/classstack.html">stack</a>-&gt;<a class="code" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a>] = operand;</div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;}</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="../../d7/d75/postfix__evaluation_8cpp_ad77f8c9cc594975756838d498c237cea_cgraph.svg" width="328" 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="a6a8eeb7d346d5cd6335d9780fb7c0f15"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6a8eeb7d346d5cd6335d9780fb7c0f15">&#9670;&nbsp;</a></span>test_function_1()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static void test_function_1 </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Test function 1 with input array {'2', '3', '1', '*', '+', '9', '-'}. </p>
<dl class="section return"><dt>Returns</dt><dd>none </dd></dl>
<div class="fragment"><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; {</div>
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <a class="codeRef" 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"><a name="l00148"></a><span class="lineno"> 148</span>&#160; </div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; <span class="keywordtype">float</span> answer = <a class="code" href="../../d7/d75/postfix__evaluation_8cpp.html#ae38bd3a177a6d61da3859a281233bbe1">others::postfix_expression::postfix_evaluation</a>(input);</div>
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; </div>
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; assert(answer == -4);</div>
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a id="a5b97d12e8b61484f756a8721992bfae1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5b97d12e8b61484f756a8721992bfae1">&#9670;&nbsp;</a></span>test_function_2()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static void test_function_2 </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Test function 2 with input array {'1', '2', '+', '2', '/', '5', '*', '7', '+'}. </p>
<dl class="section return"><dt>Returns</dt><dd>none </dd></dl>
<div class="fragment"><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; {</div>
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; <a class="codeRef" 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"><a name="l00161"></a><span class="lineno"> 161</span>&#160; <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"><a name="l00162"></a><span class="lineno"> 162</span>&#160; <span class="keywordtype">float</span> answer = <a class="code" href="../../d7/d75/postfix__evaluation_8cpp.html#ae38bd3a177a6d61da3859a281233bbe1">others::postfix_expression::postfix_evaluation</a>(input);</div>
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; </div>
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; assert(answer == 757);</div>
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<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 class="ttdoc">STL class.</div></div>
<div class="ttc" id="aall_any_none_of_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/all_any_none_of.html">std::all_of</a></div><div class="ttdeci">T all_of(T... args)</div></div>
<div class="ttc" id="apostfix__evaluation_8cpp_html_a4c27f949c9d6659be9f5bd2ccbe1360a"><div class="ttname"><a href="../../d7/d75/postfix__evaluation_8cpp.html#a4c27f949c9d6659be9f5bd2ccbe1360a">others::postfix_expression::is_number</a></div><div class="ttdeci">bool is_number(const std::string &amp;s)</div><div class="ttdoc">Checks if scanned string is a number.</div><div class="ttdef"><b>Definition:</b> postfix_evaluation.cpp:65</div></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="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="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="aarray_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/array.html">std::array</a></div><div class="ttdoc">STL class.</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_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="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 class="ttc" id="aclassstack_html_a5b64337ec34b12e98458bb9b9d5f8f83"><div class="ttname"><a href="../../d1/dc2/classstack.html#a5b64337ec34b12e98458bb9b9d5f8f83">stack::stack</a></div><div class="ttdeci">stack()</div><div class="ttdef"><b>Definition:</b> stack.h:41</div></div>
<div class="ttc" id="abegin_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string/begin.html">std::string::begin</a></div><div class="ttdeci">T begin(T... args)</div></div>
<div class="ttc" id="aclassstack_html"><div class="ttname"><a href="../../d1/dc2/classstack.html">stack</a></div><div class="ttdef"><b>Definition:</b> stack.h:26</div></div>
<div class="ttc" id="aempty_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string/empty.html">std::string::empty</a></div><div class="ttdeci">T empty(T... args)</div></div>
<div class="ttc" id="aclassstack_html_a7289037c059aaad492b4d68e6bd54453"><div class="ttname"><a href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stack::stackTop</a></div><div class="ttdeci">node&lt; Type &gt; * stackTop</div><div class="ttdef"><b>Definition:</b> stack.h:146</div></div>
<div class="ttc" id="aend_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string/end.html">std::string::end</a></div><div class="ttdeci">T end(T... args)</div></div>
<div class="ttc" id="aparanthesis__matching_8cpp_html_aa37d24a036d239b3b528f13b9de880c7"><div class="ttname"><a href="../../dc/dc5/paranthesis__matching_8cpp.html#aa37d24a036d239b3b528f13b9de880c7">stack</a></div><div class="ttdeci">char stack[MAX]</div><div class="ttdef"><b>Definition:</b> paranthesis_matching.cpp:20</div></div>
<div class="ttc" id="aparanthesis__matching_8cpp_html_aae41c72130114bf31204cde6873b6095"><div class="ttname"><a href="../../dc/dc5/paranthesis__matching_8cpp.html#aae41c72130114bf31204cde6873b6095">push</a></div><div class="ttdeci">void push(char ch)</div><div class="ttdoc">push byte to stack variable</div><div class="ttdef"><b>Definition:</b> paranthesis_matching.cpp:26</div></div>
<div class="ttc" id="aparanthesis__matching_8cpp_html_a6d25c7dfbfeb52c3cb9d1b56ab49b664"><div class="ttname"><a href="../../dc/dc5/paranthesis__matching_8cpp.html#a6d25c7dfbfeb52c3cb9d1b56ab49b664">pop</a></div><div class="ttdeci">char pop()</div><div class="ttdoc">pop a byte out of stack variable</div><div class="ttdef"><b>Definition:</b> paranthesis_matching.cpp:29</div></div>
<!-- start footer part -->
<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="http://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.8.20 </li>
</ul>
</div>
</body>
</html>

View File

@@ -0,0 +1,12 @@
var postfix__evaluation_8cpp =
[
[ "Stack", "d5/d8a/classothers_1_1postfix__expression_1_1_stack.html", "d5/d8a/classothers_1_1postfix__expression_1_1_stack" ],
[ "evaluate", "d7/d75/postfix__evaluation_8cpp.html#a59fd597e0ea394abe027ced4d2ea3338", null ],
[ "is_number", "d7/d75/postfix__evaluation_8cpp.html#a4c27f949c9d6659be9f5bd2ccbe1360a", null ],
[ "main", "d7/d75/postfix__evaluation_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ],
[ "pop", "d7/d75/postfix__evaluation_8cpp.html#a421baa2002a64bc0bfc3e1b64800d734", null ],
[ "postfix_evaluation", "d7/d75/postfix__evaluation_8cpp.html#ae38bd3a177a6d61da3859a281233bbe1", null ],
[ "push", "d7/d75/postfix__evaluation_8cpp.html#ad77f8c9cc594975756838d498c237cea", null ],
[ "test_function_1", "d7/d75/postfix__evaluation_8cpp.html#a6a8eeb7d346d5cd6335d9780fb7c0f15", null ],
[ "test_function_2", "d7/d75/postfix__evaluation_8cpp.html#a5b97d12e8b61484f756a8721992bfae1", null ]
];

View File

@@ -0,0 +1,4 @@
<map id="others::postfix_expression::pop" name="others::postfix_expression::pop">
<area shape="rect" id="node1" title="Popping operand, also called the number from the stack." alt="" coords="5,5,209,32"/>
<area shape="rect" id="node2" href="$d1/dc2/classstack.html#a5b64337ec34b12e98458bb9b9d5f8f83" title=" " alt="" coords="257,5,352,32"/>
</map>

View File

@@ -0,0 +1 @@
700593b0d02d6c82694a3c4e2e6be9b0

View File

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.44.1 (20200629.0846)
-->
<!-- Title: others::postfix_expression::pop Pages: 1 -->
<svg width="268pt" height="28pt"
viewBox="0.00 0.00 268.00 28.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 24)">
<title>others::postfix_expression::pop</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-24 264,-24 264,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="Popping operand, also called the number from the stack.">
<polygon fill="#bfbfbf" stroke="black" points="0,-0.5 0,-19.5 153,-19.5 153,-0.5 0,-0.5"/>
<text text-anchor="middle" x="76.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">others::postfix_expression::pop</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a xlink:href="../../d1/dc2/classstack.html#a5b64337ec34b12e98458bb9b9d5f8f83" target="_top" xlink:title=" ">
<polygon fill="white" stroke="black" points="189,-0.5 189,-19.5 260,-19.5 260,-0.5 189,-0.5"/>
<text text-anchor="middle" x="224.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">stack::stack</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M153.07,-10C161.87,-10 170.63,-10 178.82,-10"/>
<polygon fill="midnightblue" stroke="midnightblue" points="178.86,-13.5 188.86,-10 178.86,-6.5 178.86,-13.5"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -0,0 +1,7 @@
<map id="others::postfix_expression::is_number" name="others::postfix_expression::is_number">
<area shape="rect" id="node1" title="Checks if scanned string is a number." alt="" coords="5,74,180,115"/>
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/all_any_none_of.html#" title=" " alt="" coords="251,5,329,32"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/begin.html#" title=" " alt="" coords="231,56,349,83"/>
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/empty.html#" title=" " alt="" coords="228,107,352,133"/>
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/end.html#" title=" " alt="" coords="235,157,345,184"/>
</map>

View File

@@ -0,0 +1 @@
cb8d762fa5c52a82abfed64eae9a1108

View File

@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.44.1 (20200629.0846)
-->
<!-- Title: others::postfix_expression::is_number Pages: 1 -->
<svg width="268pt" height="142pt"
viewBox="0.00 0.00 268.00 142.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 138)">
<title>others::postfix_expression::is_number</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-138 264,-138 264,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="Checks if scanned string is a number.">
<polygon fill="#bfbfbf" stroke="black" points="0,-52 0,-82 131,-82 131,-52 0,-52"/>
<text text-anchor="start" x="8" y="-70" font-family="Helvetica,sans-Serif" font-size="10.00">others::postfix_expression</text>
<text text-anchor="middle" x="65.5" y="-59" font-family="Helvetica,sans-Serif" font-size="10.00">::is_number</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge5" class="edge">
<title>Node1&#45;&gt;Node1</title>
<path fill="none" stroke="midnightblue" d="M39.71,-82.16C33.49,-91.56 42.09,-100.5 65.5,-100.5 79.77,-100.5 88.53,-97.18 91.8,-92.46"/>
<polygon fill="midnightblue" stroke="midnightblue" points="95.28,-91.98 91.29,-82.16 88.29,-92.32 95.28,-91.98"/>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/all_any_none_of.html#" target="_top" xlink:title=" ">
<polygon fill="white" stroke="black" points="184,-114.5 184,-133.5 243,-133.5 243,-114.5 184,-114.5"/>
<text text-anchor="middle" x="213.5" y="-121.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::all_of</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M105.24,-82.13C127.95,-90.99 156.38,-102.09 178.27,-110.64"/>
<polygon fill="midnightblue" stroke="midnightblue" points="177.23,-113.99 187.82,-114.36 179.77,-107.47 177.23,-113.99"/>
</g>
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/begin.html#" target="_top" xlink:title=" ">
<polygon fill="white" stroke="black" points="169,-76.5 169,-95.5 258,-95.5 258,-76.5 169,-76.5"/>
<text text-anchor="middle" x="213.5" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::begin</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<title>Node1&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M131.39,-75.44C140.47,-76.63 149.73,-77.83 158.58,-78.98"/>
<polygon fill="midnightblue" stroke="midnightblue" points="158.39,-82.49 168.76,-80.31 159.29,-75.55 158.39,-82.49"/>
</g>
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/empty.html#" target="_top" xlink:title=" ">
<polygon fill="white" stroke="black" points="167,-38.5 167,-57.5 260,-57.5 260,-38.5 167,-38.5"/>
<text text-anchor="middle" x="213.5" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::empty</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node4 -->
<g id="edge3" class="edge">
<title>Node1&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M131.39,-58.56C139.74,-57.47 148.24,-56.36 156.43,-55.3"/>
<polygon fill="midnightblue" stroke="midnightblue" points="157.16,-58.73 166.62,-53.97 156.25,-51.79 157.16,-58.73"/>
</g>
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/end.html#" target="_top" xlink:title=" ">
<polygon fill="white" stroke="black" points="172.5,-0.5 172.5,-19.5 254.5,-19.5 254.5,-0.5 172.5,-0.5"/>
<text text-anchor="middle" x="213.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::end</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node5 -->
<g id="edge4" class="edge">
<title>Node1&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M105.24,-51.87C127.95,-43.01 156.38,-31.91 178.27,-23.36"/>
<polygon fill="midnightblue" stroke="midnightblue" points="179.77,-26.53 187.82,-19.64 177.23,-20.01 179.77,-26.53"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@@ -0,0 +1,5 @@
<map id="others::postfix_expression::evaluate" name="others::postfix_expression::evaluate">
<area shape="rect" id="node1" title="Evaluate answer using given last two operands from and operation." alt="" coords="5,29,180,71"/>
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/c_str.html#" title=" " alt="" coords="228,11,345,38"/>
<area shape="rect" id="node3" href="$dc/dc5/paranthesis__matching_8cpp.html#aae41c72130114bf31204cde6873b6095" title="push byte to stack variable" alt="" coords="261,62,312,89"/>
</map>

View File

@@ -0,0 +1 @@
e2fbc601d085345516c79dbcf14cfb85

View File

@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.44.1 (20200629.0846)
-->
<!-- Title: others::postfix_expression::evaluate Pages: 1 -->
<svg width="263pt" height="71pt"
viewBox="0.00 0.00 263.00 70.50" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 66.5)">
<title>others::postfix_expression::evaluate</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-66.5 259,-66.5 259,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="Evaluate answer using given last two operands from and operation.">
<polygon fill="#bfbfbf" stroke="black" points="0,-14 0,-44 131,-44 131,-14 0,-14"/>
<text text-anchor="start" x="8" y="-32" font-family="Helvetica,sans-Serif" font-size="10.00">others::postfix_expression</text>
<text text-anchor="middle" x="65.5" y="-21" font-family="Helvetica,sans-Serif" font-size="10.00">::evaluate</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge2" class="edge">
<title>Node1&#45;&gt;Node1</title>
<path fill="none" stroke="midnightblue" d="M40.41,-44.16C34.35,-53.56 42.72,-62.5 65.5,-62.5 79.38,-62.5 87.91,-59.18 91.09,-54.46"/>
<polygon fill="midnightblue" stroke="midnightblue" points="94.57,-53.98 90.59,-44.16 87.58,-54.31 94.57,-53.98"/>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/c_str.html#" target="_top" xlink:title=" ">
<polygon fill="white" stroke="black" points="167,-38.5 167,-57.5 255,-57.5 255,-38.5 167,-38.5"/>
<text text-anchor="middle" x="211" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::c_str</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M131.11,-37.56C139.68,-38.69 148.39,-39.84 156.73,-40.95"/>
<polygon fill="midnightblue" stroke="midnightblue" points="156.33,-44.42 166.7,-42.27 157.25,-37.48 156.33,-44.42"/>
</g>
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a xlink:href="../../dc/dc5/paranthesis__matching_8cpp.html#aae41c72130114bf31204cde6873b6095" target="_top" xlink:title="push byte to stack variable">
<polygon fill="white" stroke="black" points="192,-0.5 192,-19.5 230,-19.5 230,-0.5 192,-0.5"/>
<text text-anchor="middle" x="211" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">push</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge3" class="edge">
<title>Node1&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M131.11,-20.44C148.78,-18.11 167.03,-15.69 181.52,-13.77"/>
<polygon fill="midnightblue" stroke="midnightblue" points="182.34,-17.19 191.79,-12.41 181.42,-10.25 182.34,-17.19"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@@ -0,0 +1,4 @@
<map id="others::postfix_expression::push" name="others::postfix_expression::push">
<area shape="rect" id="node1" title="Pushing operand, also called the number in the array to the stack." alt="" coords="5,5,180,47"/>
<area shape="rect" id="node2" href="$d1/dc2/classstack.html#a5b64337ec34b12e98458bb9b9d5f8f83" title=" " alt="" coords="228,13,323,39"/>
</map>

View File

@@ -0,0 +1 @@
6b969289e6d7aae48c94007b50a7047b

View File

@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.44.1 (20200629.0846)
-->
<!-- Title: others::postfix_expression::push Pages: 1 -->
<svg width="246pt" height="39pt"
viewBox="0.00 0.00 246.00 39.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 35)">
<title>others::postfix_expression::push</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-35 242,-35 242,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="Pushing operand, also called the number in the array to the stack.">
<polygon fill="#bfbfbf" stroke="black" points="0,-0.5 0,-30.5 131,-30.5 131,-0.5 0,-0.5"/>
<text text-anchor="start" x="8" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">others::postfix_expression</text>
<text text-anchor="middle" x="65.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::push</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a xlink:href="../../d1/dc2/classstack.html#a5b64337ec34b12e98458bb9b9d5f8f83" target="_top" xlink:title=" ">
<polygon fill="white" stroke="black" points="167,-6 167,-25 238,-25 238,-6 167,-6"/>
<text text-anchor="middle" x="202.5" y="-13" font-family="Helvetica,sans-Serif" font-size="10.00">stack::stack</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M131.23,-15.5C139.89,-15.5 148.61,-15.5 156.82,-15.5"/>
<polygon fill="midnightblue" stroke="midnightblue" points="156.91,-19 166.91,-15.5 156.91,-12 156.91,-19"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -0,0 +1,14 @@
<map id="others::postfix_expression::postfix_evaluation" name="others::postfix_expression::postfix_evaluation">
<area shape="rect" id="node1" title="Postfix Evaluation algorithm to compute the value from given input array." alt="" coords="5,200,180,241"/>
<area shape="rect" id="node2" href="$d7/d75/postfix__evaluation_8cpp.html#a59fd597e0ea394abe027ced4d2ea3338" title="Evaluate answer using given last two operands from and operation." alt="" coords="228,29,403,71"/>
<area shape="rect" id="node4" href="$dc/dc5/paranthesis__matching_8cpp.html#aae41c72130114bf31204cde6873b6095" title="push byte to stack variable" alt="" coords="487,77,538,103"/>
<area shape="rect" id="node5" href="$d7/d75/postfix__evaluation_8cpp.html#a4c27f949c9d6659be9f5bd2ccbe1360a" title="Checks if scanned string is a number." alt="" coords="228,171,403,212"/>
<area shape="rect" id="node10" href="$dc/dc5/paranthesis__matching_8cpp.html#a6d25c7dfbfeb52c3cb9d1b56ab49b664" title="pop a byte out of stack variable" alt="" coords="294,237,337,263"/>
<area shape="rect" id="node11" href="$d1/dc2/classstack.html#a5b64337ec34b12e98458bb9b9d5f8f83" title=" " alt="" coords="268,287,363,314"/>
<area shape="rect" id="node12" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/stof.html#" title=" " alt="" coords="280,338,351,365"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/c_str.html#" title=" " alt="" coords="454,26,571,53"/>
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/all_any_none_of.html#" title=" " alt="" coords="473,127,552,154"/>
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/begin.html#" title=" " alt="" coords="453,178,572,205"/>
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/empty.html#" title=" " alt="" coords="451,229,575,255"/>
<area shape="rect" id="node9" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/end.html#" title=" " alt="" coords="458,279,567,306"/>
</map>

View File

@@ -0,0 +1 @@
bb34c6aebfe9b2a7eb076e516a85debe

View File

@@ -0,0 +1,214 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.44.1 (20200629.0846)
-->
<!-- Title: others::postfix_expression::postfix_evaluation Pages: 1 -->
<svg width="435pt" height="278pt"
viewBox="0.00 0.00 435.00 277.50" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 273.5)">
<title>others::postfix_expression::postfix_evaluation</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-273.5 431,-273.5 431,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="Postfix Evaluation algorithm to compute the value from given input array.">
<polygon fill="#bfbfbf" stroke="black" points="0,-93 0,-123 131,-123 131,-93 0,-93"/>
<text text-anchor="start" x="8" y="-111" font-family="Helvetica,sans-Serif" font-size="10.00">others::postfix_expression</text>
<text text-anchor="middle" x="65.5" y="-100" font-family="Helvetica,sans-Serif" font-size="10.00">::postfix_evaluation</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge12" class="edge">
<title>Node1&#45;&gt;Node1</title>
<path fill="none" stroke="midnightblue" d="M36.57,-123.16C29.6,-132.56 39.24,-141.5 65.5,-141.5 81.5,-141.5 91.34,-138.18 95,-133.46"/>
<polygon fill="midnightblue" stroke="midnightblue" points="98.47,-132.95 94.43,-123.16 91.48,-133.34 98.47,-132.95"/>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a xlink:href="../../d7/d75/postfix__evaluation_8cpp.html#a59fd597e0ea394abe027ced4d2ea3338" target="_top" xlink:title="Evaluate answer using given last two operands from and operation.">
<polygon fill="white" stroke="black" points="167,-221 167,-251 298,-251 298,-221 167,-221"/>
<text text-anchor="start" x="175" y="-239" font-family="Helvetica,sans-Serif" font-size="10.00">others::postfix_expression</text>
<text text-anchor="middle" x="232.5" y="-228" font-family="Helvetica,sans-Serif" font-size="10.00">::evaluate</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M79.16,-123.24C97.05,-144.03 131.5,-181.5 167,-206 172.34,-209.68 178.2,-213.12 184.14,-216.25"/>
<polygon fill="midnightblue" stroke="midnightblue" points="182.98,-219.58 193.49,-220.92 186.11,-213.32 182.98,-219.58"/>
</g>
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a xlink:href="../../dc/dc5/paranthesis__matching_8cpp.html#aae41c72130114bf31204cde6873b6095" target="_top" xlink:title="push byte to stack variable">
<polygon fill="white" stroke="black" points="361.5,-196.5 361.5,-215.5 399.5,-215.5 399.5,-196.5 361.5,-196.5"/>
<text text-anchor="middle" x="380.5" y="-203.5" font-family="Helvetica,sans-Serif" font-size="10.00">push</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node4 -->
<g id="edge13" class="edge">
<title>Node1&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M84.48,-123.01C103.65,-138.17 135.54,-161.01 167,-173 229.77,-196.92 309.27,-203.52 350.98,-205.33"/>
<polygon fill="midnightblue" stroke="midnightblue" points="351.1,-208.83 361.22,-205.71 351.36,-201.84 351.1,-208.83"/>
</g>
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a xlink:href="../../d7/d75/postfix__evaluation_8cpp.html#a4c27f949c9d6659be9f5bd2ccbe1360a" target="_top" xlink:title="Checks if scanned string is a number.">
<polygon fill="white" stroke="black" points="167,-115 167,-145 298,-145 298,-115 167,-115"/>
<text text-anchor="start" x="175" y="-133" font-family="Helvetica,sans-Serif" font-size="10.00">others::postfix_expression</text>
<text text-anchor="middle" x="232.5" y="-122" font-family="Helvetica,sans-Serif" font-size="10.00">::is_number</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node5 -->
<g id="edge5" class="edge">
<title>Node1&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M131.24,-116.63C139.67,-117.76 148.37,-118.92 156.95,-120.06"/>
<polygon fill="midnightblue" stroke="midnightblue" points="156.57,-123.54 166.95,-121.39 157.5,-116.6 156.57,-123.54"/>
</g>
<!-- Node10 -->
<g id="node10" class="node">
<title>Node10</title>
<g id="a_node10"><a xlink:href="../../dc/dc5/paranthesis__matching_8cpp.html#a6d25c7dfbfeb52c3cb9d1b56ab49b664" target="_top" xlink:title="pop a byte out of stack variable">
<polygon fill="white" stroke="black" points="216.5,-76.5 216.5,-95.5 248.5,-95.5 248.5,-76.5 216.5,-76.5"/>
<text text-anchor="middle" x="232.5" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">pop</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node10 -->
<g id="edge11" class="edge">
<title>Node1&#45;&gt;Node10</title>
<path fill="none" stroke="midnightblue" d="M131.24,-99.37C157.44,-95.87 186.16,-92.05 206.12,-89.38"/>
<polygon fill="midnightblue" stroke="midnightblue" points="206.78,-92.83 216.23,-88.04 205.86,-85.89 206.78,-92.83"/>
</g>
<!-- Node11 -->
<g id="node11" class="node">
<title>Node11</title>
<g id="a_node11"><a xlink:href="../../d1/dc2/classstack.html#a5b64337ec34b12e98458bb9b9d5f8f83" target="_top" xlink:title=" ">
<polygon fill="white" stroke="black" points="197,-38.5 197,-57.5 268,-57.5 268,-38.5 197,-38.5"/>
<text text-anchor="middle" x="232.5" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">stack::stack</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node11 -->
<g id="edge14" class="edge">
<title>Node1&#45;&gt;Node11</title>
<path fill="none" stroke="midnightblue" d="M101.05,-92.9C120.29,-84.74 144.77,-74.79 167,-67 173.44,-64.74 180.3,-62.53 187.06,-60.45"/>
<polygon fill="midnightblue" stroke="midnightblue" points="188.25,-63.75 196.82,-57.52 186.23,-57.04 188.25,-63.75"/>
</g>
<!-- Node12 -->
<g id="node12" class="node">
<title>Node12</title>
<g id="a_node12"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/stof.html#" target="_top" xlink:title=" ">
<polygon fill="white" stroke="black" points="206,-0.5 206,-19.5 259,-19.5 259,-0.5 206,-0.5"/>
<text text-anchor="middle" x="232.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::stof</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node12 -->
<g id="edge15" class="edge">
<title>Node1&#45;&gt;Node12</title>
<path fill="none" stroke="midnightblue" d="M81.88,-92.79C100.55,-75.12 133.67,-46.2 167,-29 176.01,-24.35 186.33,-20.67 196.03,-17.84"/>
<polygon fill="midnightblue" stroke="midnightblue" points="197.1,-21.17 205.84,-15.18 195.27,-14.42 197.1,-21.17"/>
</g>
<!-- Node2&#45;&gt;Node2 -->
<g id="edge3" class="edge">
<title>Node2&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M206.71,-251.16C200.49,-260.56 209.09,-269.5 232.5,-269.5 246.77,-269.5 255.53,-266.18 258.8,-261.46"/>
<polygon fill="midnightblue" stroke="midnightblue" points="262.28,-260.98 258.29,-251.16 255.29,-261.32 262.28,-260.98"/>
</g>
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/c_str.html#" target="_top" xlink:title=" ">
<polygon fill="white" stroke="black" points="336.5,-234.5 336.5,-253.5 424.5,-253.5 424.5,-234.5 336.5,-234.5"/>
<text text-anchor="middle" x="380.5" y="-241.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::c_str</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<title>Node2&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M298.39,-239.56C307.68,-240.06 317.16,-240.58 326.2,-241.08"/>
<polygon fill="midnightblue" stroke="midnightblue" points="326.01,-244.57 336.18,-241.63 326.39,-237.58 326.01,-244.57"/>
</g>
<!-- Node2&#45;&gt;Node4 -->
<g id="edge4" class="edge">
<title>Node2&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M298.39,-222.67C316.9,-218.86 336.11,-214.92 351.19,-211.82"/>
<polygon fill="midnightblue" stroke="midnightblue" points="352.27,-215.17 361.37,-209.73 350.87,-208.31 352.27,-215.17"/>
</g>
<!-- Node5&#45;&gt;Node5 -->
<g id="edge10" class="edge">
<title>Node5&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M206.71,-145.16C200.49,-154.56 209.09,-163.5 232.5,-163.5 246.77,-163.5 255.53,-160.18 258.8,-155.46"/>
<polygon fill="midnightblue" stroke="midnightblue" points="262.28,-154.98 258.29,-145.16 255.29,-155.32 262.28,-154.98"/>
</g>
<!-- Node6 -->
<g id="node6" class="node">
<title>Node6</title>
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/all_any_none_of.html#" target="_top" xlink:title=" ">
<polygon fill="white" stroke="black" points="351,-158.5 351,-177.5 410,-177.5 410,-158.5 351,-158.5"/>
<text text-anchor="middle" x="380.5" y="-165.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::all_of</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node6 -->
<g id="edge6" class="edge">
<title>Node5&#45;&gt;Node6</title>
<path fill="none" stroke="midnightblue" d="M291.2,-145.02C307.78,-149.33 325.46,-153.94 340.61,-157.88"/>
<polygon fill="midnightblue" stroke="midnightblue" points="340.1,-161.36 350.66,-160.49 341.86,-154.59 340.1,-161.36"/>
</g>
<!-- Node7 -->
<g id="node7" class="node">
<title>Node7</title>
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/begin.html#" target="_top" xlink:title=" ">
<polygon fill="white" stroke="black" points="336,-120.5 336,-139.5 425,-139.5 425,-120.5 336,-120.5"/>
<text text-anchor="middle" x="380.5" y="-127.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::begin</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node7 -->
<g id="edge7" class="edge">
<title>Node5&#45;&gt;Node7</title>
<path fill="none" stroke="midnightblue" d="M298.39,-130C307.47,-130 316.73,-130 325.58,-130"/>
<polygon fill="midnightblue" stroke="midnightblue" points="325.76,-133.5 335.76,-130 325.76,-126.5 325.76,-133.5"/>
</g>
<!-- Node8 -->
<g id="node8" class="node">
<title>Node8</title>
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/empty.html#" target="_top" xlink:title=" ">
<polygon fill="white" stroke="black" points="334,-82.5 334,-101.5 427,-101.5 427,-82.5 334,-82.5"/>
<text text-anchor="middle" x="380.5" y="-89.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::empty</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node8 -->
<g id="edge8" class="edge">
<title>Node5&#45;&gt;Node8</title>
<path fill="none" stroke="midnightblue" d="M291.2,-114.98C305.05,-111.38 319.66,-107.57 332.93,-104.12"/>
<polygon fill="midnightblue" stroke="midnightblue" points="333.99,-107.46 342.78,-101.56 332.22,-100.69 333.99,-107.46"/>
</g>
<!-- Node9 -->
<g id="node9" class="node">
<title>Node9</title>
<g id="a_node9"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/end.html#" target="_top" xlink:title=" ">
<polygon fill="white" stroke="black" points="339.5,-44.5 339.5,-63.5 421.5,-63.5 421.5,-44.5 339.5,-44.5"/>
<text text-anchor="middle" x="380.5" y="-51.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::end</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node9 -->
<g id="edge9" class="edge">
<title>Node5&#45;&gt;Node9</title>
<path fill="none" stroke="midnightblue" d="M278.56,-114.93C285.27,-112.01 291.95,-108.69 298,-105 316.27,-93.84 315.88,-84.39 334,-73 336.83,-71.22 339.85,-69.55 342.94,-67.98"/>
<polygon fill="midnightblue" stroke="midnightblue" points="344.71,-71.02 352.3,-63.63 341.75,-64.67 344.71,-71.02"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -0,0 +1,5 @@
<map id="main" name="main">
<area shape="rect" id="node1" title="Main function." alt="" coords="5,31,56,57"/>
<area shape="rect" id="node2" href="$d7/d75/postfix__evaluation_8cpp.html#a6a8eeb7d346d5cd6335d9780fb7c0f15" title="Test function 1 with input array {&#39;2&#39;, &#39;3&#39;, &#39;1&#39;, &#39;*&#39;, &#39;+&#39;, &#39;9&#39;, &#39;&#45;&#39;}." alt="" coords="104,5,215,32"/>
<area shape="rect" id="node3" href="$d7/d75/postfix__evaluation_8cpp.html#a5b97d12e8b61484f756a8721992bfae1" title="Test function 2 with input array {&#39;1&#39;, &#39;2&#39;, &#39;+&#39;, &#39;2&#39;, &#39;/&#39;, &#39;5&#39;, &#39;*&#39;, &#39;7&#39;, &#39;+&#39;}." alt="" coords="104,56,215,83"/>
</map>

View File

@@ -0,0 +1 @@
231c2e3e1d26b4d0f5f45606bd579f47

View File

@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.44.1 (20200629.0846)
-->
<!-- Title: main Pages: 1 -->
<svg width="165pt" height="66pt"
viewBox="0.00 0.00 165.00 66.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 62)">
<title>main</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-62 161,-62 161,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="Main function.">
<polygon fill="#bfbfbf" stroke="black" points="0,-19.5 0,-38.5 38,-38.5 38,-19.5 0,-19.5"/>
<text text-anchor="middle" x="19" y="-26.5" font-family="Helvetica,sans-Serif" font-size="10.00">main</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a xlink:href="../../d7/d75/postfix__evaluation_8cpp.html#a6a8eeb7d346d5cd6335d9780fb7c0f15" target="_top" xlink:title="Test function 1 with input array {&#39;2&#39;, &#39;3&#39;, &#39;1&#39;, &#39;*&#39;, &#39;+&#39;, &#39;9&#39;, &#39;&#45;&#39;}.">
<polygon fill="white" stroke="black" points="74,-38.5 74,-57.5 157,-57.5 157,-38.5 74,-38.5"/>
<text text-anchor="middle" x="115.5" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">test_function_1</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M38.22,-32.66C45.63,-34.15 54.58,-35.95 63.72,-37.79"/>
<polygon fill="midnightblue" stroke="midnightblue" points="63.14,-41.24 73.63,-39.78 64.52,-34.38 63.14,-41.24"/>
</g>
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a xlink:href="../../d7/d75/postfix__evaluation_8cpp.html#a5b97d12e8b61484f756a8721992bfae1" target="_top" xlink:title="Test function 2 with input array {&#39;1&#39;, &#39;2&#39;, &#39;+&#39;, &#39;2&#39;, &#39;/&#39;, &#39;5&#39;, &#39;*&#39;, &#39;7&#39;, &#39;+&#39;}.">
<polygon fill="white" stroke="black" points="74,-0.5 74,-19.5 157,-19.5 157,-0.5 74,-0.5"/>
<text text-anchor="middle" x="115.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">test_function_2</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<title>Node1&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M38.22,-25.34C45.63,-23.85 54.58,-22.05 63.72,-20.21"/>
<polygon fill="midnightblue" stroke="midnightblue" points="64.52,-23.62 73.63,-18.22 63.14,-16.76 64.52,-23.62"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB