mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-03-21 12:23:13 +08:00
Documentation for f1eddf4d65
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="generator" content="Doxygen 1.14.0"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: others/postfix_evaluation.cpp Source File</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -19,7 +19,6 @@
|
||||
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../navtreedata.js"></script>
|
||||
<script type="text/javascript" src="../../navtree.js"></script>
|
||||
<script type="text/javascript" src="../../resize.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>
|
||||
@@ -60,26 +59,20 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<!-- Generated by Doxygen 1.14.0 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() { codefold.init(1); });
|
||||
/* @license-end */
|
||||
$(function() { codefold.init(); });
|
||||
</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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('../../',true,false,'search.php','Search',true);
|
||||
$(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
@@ -94,10 +87,9 @@ $(function() {
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function(){initNavTree('d7/d75/postfix__evaluation_8cpp_source.html','../../'); initResizable(true); });
|
||||
/* @license-end */
|
||||
$(function(){initNavTree('d7/d75/postfix__evaluation_8cpp_source.html','../../',''); });
|
||||
</script>
|
||||
<div id="container">
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
@@ -149,7 +141,7 @@ $(function(){initNavTree('d7/d75/postfix__evaluation_8cpp_source.html','../../')
|
||||
</div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span></div>
|
||||
<div class="foldopen" id="foldopen00054" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"><a class="line" href="../../d7/d75/postfix__evaluation_8cpp.html#a421baa2002a64bc0bfc3e1b64800d734"> 54</a></span><span class="keywordtype">float</span> <a class="code hl_function" href="../../d7/d75/postfix__evaluation_8cpp.html#a421baa2002a64bc0bfc3e1b64800d734">pop</a>(<a class="code hl_class" href="../../d5/d8a/classothers_1_1postfix__expression_1_1_stack.html">Stack</a> *<a class="code hl_class" href="../../d1/dc2/classstack.html">stack</a>) {</div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"><a class="line" href="../../d7/d75/postfix__evaluation_8cpp.html#a421baa2002a64bc0bfc3e1b64800d734"> 54</a></span><span class="keywordtype">float</span> <a class="code hl_function" href="../../dc/dc5/paranthesis__matching_8cpp.html#a6d25c7dfbfeb52c3cb9d1b56ab49b664">pop</a>(<a class="code hl_class" href="../../d5/d8a/classothers_1_1postfix__expression_1_1_stack.html">Stack</a> *<a class="code hl_class" href="../../d1/dc2/classstack.html">stack</a>) {</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="keywordtype">float</span> operand = <a class="code hl_class" href="../../d1/dc2/classstack.html">stack</a>->stack[<a class="code hl_class" href="../../d1/dc2/classstack.html">stack</a>-><a class="code hl_variable" href="../../d1/dc2/classstack.html#aefb3dac828e32b4ec014ff4b5d43a6b8">stackTop</a>];</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <a class="code hl_class" href="../../d1/dc2/classstack.html">stack</a>-><a class="code hl_variable" href="../../d1/dc2/classstack.html#aefb3dac828e32b4ec014ff4b5d43a6b8">stackTop</a>--;</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="keywordflow">return</span> operand;</div>
|
||||
@@ -206,8 +198,8 @@ $(function(){initNavTree('d7/d75/postfix__evaluation_8cpp_source.html','../../')
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <a class="code hl_function" href="../../d7/d75/postfix__evaluation_8cpp.html#ad77f8c9cc594975756838d498c237cea">push</a>(std::stof(scan), &<a class="code hl_class" href="../../d1/dc2/classstack.html">stack</a>);</div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> </div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> <span class="keywordtype">float</span> op2 = <a class="code hl_function" href="../../d7/d75/postfix__evaluation_8cpp.html#a421baa2002a64bc0bfc3e1b64800d734">pop</a>(&<a class="code hl_class" href="../../d1/dc2/classstack.html">stack</a>);</div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <span class="keywordtype">float</span> op1 = <a class="code hl_function" href="../../d7/d75/postfix__evaluation_8cpp.html#a421baa2002a64bc0bfc3e1b64800d734">pop</a>(&<a class="code hl_class" href="../../d1/dc2/classstack.html">stack</a>);</div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> <span class="keywordtype">float</span> op2 = <a class="code hl_function" href="../../dc/dc5/paranthesis__matching_8cpp.html#a6d25c7dfbfeb52c3cb9d1b56ab49b664">pop</a>(&<a class="code hl_class" href="../../d1/dc2/classstack.html">stack</a>);</div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <span class="keywordtype">float</span> op1 = <a class="code hl_function" href="../../dc/dc5/paranthesis__matching_8cpp.html#a6d25c7dfbfeb52c3cb9d1b56ab49b664">pop</a>(&<a class="code hl_class" href="../../d1/dc2/classstack.html">stack</a>);</div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> </div>
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> <a class="code hl_function" href="../../d7/d75/postfix__evaluation_8cpp.html#a59fd597e0ea394abe027ced4d2ea3338">evaluate</a>(op1, op2, scan, &<a class="code hl_class" href="../../d1/dc2/classstack.html">stack</a>);</div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> }</div>
|
||||
@@ -260,7 +252,7 @@ $(function(){initNavTree('d7/d75/postfix__evaluation_8cpp_source.html','../../')
|
||||
<div class="ttc" id="aclassstack_html_aefb3dac828e32b4ec014ff4b5d43a6b8"><div class="ttname"><a href="../../d1/dc2/classstack.html#aefb3dac828e32b4ec014ff4b5d43a6b8">stack::stackTop</a></div><div class="ttdeci">std::shared_ptr< Node< value_type > > stackTop</div><div class="ttdef"><b>Definition</b> <a href="../../df/d47/stack_8hpp_source.html#l00075">stack.hpp:75</a></div></div>
|
||||
<div class="ttc" id="anamespaceothers_html"><div class="ttname"><a href="../../d0/d6f/namespaceothers.html">others</a></div><div class="ttdoc">for vector</div></div>
|
||||
<div class="ttc" id="anamespacepostfix__expression_html"><div class="ttname"><a href="../../d4/de6/namespacepostfix__expression.html">postfix_expression</a></div><div class="ttdoc">Functions for Postfix Expression algorithm.</div></div>
|
||||
<div class="ttc" id="apostfix__evaluation_8cpp_html_a421baa2002a64bc0bfc3e1b64800d734"><div class="ttname"><a href="../../d7/d75/postfix__evaluation_8cpp.html#a421baa2002a64bc0bfc3e1b64800d734">others::postfix_expression::pop</a></div><div class="ttdeci">float pop(Stack *stack)</div><div class="ttdoc">Popping operand, also called the number from the stack.</div><div class="ttdef"><b>Definition</b> <a href="#l00054">postfix_evaluation.cpp:54</a></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> <a href="../../dc/dc5/paranthesis__matching_8cpp_source.html#l00029">paranthesis_matching.cpp:29</a></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 &s)</div><div class="ttdoc">Checks if scanned string is a number.</div><div class="ttdef"><b>Definition</b> <a href="#l00065">postfix_evaluation.cpp:65</a></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 &operation, Stack *stack)</div><div class="ttdoc">Evaluate answer using given last two operands from and operation.</div><div class="ttdef"><b>Definition</b> <a href="#l00077">postfix_evaluation.cpp:77</a></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> <a href="#l00159">postfix_evaluation.cpp:159</a></div></div>
|
||||
@@ -270,11 +262,12 @@ $(function(){initNavTree('d7/d75/postfix__evaluation_8cpp_source.html','../../')
|
||||
<div class="ttc" id="apostfix__evaluation_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../d7/d75/postfix__evaluation_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdoc">Main function.</div><div class="ttdef"><b>Definition</b> <a href="#l00171">postfix_evaluation.cpp:171</a></div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
</div><!-- container -->
|
||||
<!-- 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="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.2 </li>
|
||||
<li class="navelem"><a href="../../dir_9510827d0b234b3cc54b29892f217477.html">others</a></li><li class="navelem"><a 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.14.0 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user