Files
musrfit/classPFunction_1_1EvalVisitor.html
Gitea Actions 7039af84d2 Deploy site
2026-03-15 08:59:40 +00:00

510 lines
29 KiB
HTML

<!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" lang="en-US">
<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="viewport" content="width=device-width, initial-scale=1"/>
<title>musrfit: PFunction::EvalVisitor Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="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="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 id="projectrow">
<td id="projectalign">
<div id="projectname">musrfit<span id="projectnumber">&#160;1.10.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.13.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',false,false,'search.php','Search',true);
});
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){initNavTree('classPFunction_1_1EvalVisitor.html',''); initResizable(true); });
/* @license-end */
</script>
<div id="doc-content">
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="classPFunction_1_1EvalVisitor-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">PFunction::EvalVisitor Class Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Visitor class for evaluating the AST.
<a href="#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for PFunction::EvalVisitor:</div>
<div class="dyncontent">
<div class="center"><img src="classPFunction_1_1EvalVisitor__inherit__graph.png" border="0" usemap="#aPFunction_1_1EvalVisitor_inherit__map" alt="Inheritance graph"/></div>
<map name="aPFunction_1_1EvalVisitor_inherit__map" id="aPFunction_1_1EvalVisitor_inherit__map">
<area shape="rect" title="Visitor class for evaluating the AST." alt="" coords="5,98,157,126"/>
<area shape="rect" title=" " alt="" coords="12,5,150,50"/>
<area shape="poly" title=" " alt="" coords="84,66,84,97,78,97,78,66"/>
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for PFunction::EvalVisitor:</div>
<div class="dyncontent">
<div class="center"><img src="classPFunction_1_1EvalVisitor__coll__graph.png" border="0" usemap="#aPFunction_1_1EvalVisitor_coll__map" alt="Collaboration graph"/></div>
<map name="aPFunction_1_1EvalVisitor_coll__map" id="aPFunction_1_1EvalVisitor_coll__map">
<area shape="rect" title="Visitor class for evaluating the AST." alt="" coords="66,115,218,143"/>
<area shape="rect" title=" " alt="" coords="5,5,143,50"/>
<area shape="poly" title=" " alt="" coords="100,61,135,113,131,116,95,64"/>
<area shape="rect" href="structPMetaData.html" title=" " alt="" coords="166,14,254,42"/>
<area shape="poly" title=" " alt="" coords="195,56,153,116,148,113,191,53"/>
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:acdb868631d6f2d2b268269bf3e72a0c2" id="r_acdb868631d6f2d2b268269bf3e72a0c2"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#acdb868631d6f2d2b268269bf3e72a0c2">EvalVisitor</a> (const std::vector&lt; Int_t &gt; &amp;map, const std::vector&lt; Double_t &gt; &amp;param, const <a class="el" href="structPMetaData.html">PMetaData</a> &amp;metaData)</td></tr>
<tr class="separator:acdb868631d6f2d2b268269bf3e72a0c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a37fc0edbda8b4c40b3f710754f62a622" id="r_a37fc0edbda8b4c40b3f710754f62a622"><td class="memItemLeft" align="right" valign="top">Double_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a37fc0edbda8b4c40b3f710754f62a622">operator()</a> (const musrfit::ast::leer &amp;) const</td></tr>
<tr class="memdesc:a37fc0edbda8b4c40b3f710754f62a622"><td class="mdescLeft">&#160;</td><td class="mdescRight">Evaluates a leer (empty) AST node. <br /></td></tr>
<tr class="separator:a37fc0edbda8b4c40b3f710754f62a622"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3abef7e5172aa81882ff62aa4b64671b" id="r_a3abef7e5172aa81882ff62aa4b64671b"><td class="memItemLeft" align="right" valign="top">Double_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a3abef7e5172aa81882ff62aa4b64671b">operator()</a> (double val) const</td></tr>
<tr class="memdesc:a3abef7e5172aa81882ff62aa4b64671b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Evaluates a numeric literal. <br /></td></tr>
<tr class="separator:a3abef7e5172aa81882ff62aa4b64671b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa327bf668a817796245460d51d73fde7" id="r_aa327bf668a817796245460d51d73fde7"><td class="memItemLeft" align="right" valign="top">Double_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aa327bf668a817796245460d51d73fde7">operator()</a> (const musrfit::ast::constant &amp;c) const</td></tr>
<tr class="memdesc:aa327bf668a817796245460d51d73fde7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Evaluates a constant (PI, GAMMA_MU, B, EN, T#). <br /></td></tr>
<tr class="separator:aa327bf668a817796245460d51d73fde7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a70eb1bcffe4f9094124e143141c063da" id="r_a70eb1bcffe4f9094124e143141c063da"><td class="memItemLeft" align="right" valign="top">Double_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a70eb1bcffe4f9094124e143141c063da">operator()</a> (const musrfit::ast::parameter &amp;p) const</td></tr>
<tr class="memdesc:a70eb1bcffe4f9094124e143141c063da"><td class="mdescLeft">&#160;</td><td class="mdescRight">Evaluates a parameter reference (PAR#). <br /></td></tr>
<tr class="separator:a70eb1bcffe4f9094124e143141c063da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a52fb52bb9fed6f994a5cf6585eb46fb5" id="r_a52fb52bb9fed6f994a5cf6585eb46fb5"><td class="memItemLeft" align="right" valign="top">Double_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a52fb52bb9fed6f994a5cf6585eb46fb5">operator()</a> (const musrfit::ast::map_ref &amp;m) const</td></tr>
<tr class="memdesc:a52fb52bb9fed6f994a5cf6585eb46fb5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Evaluates a map reference (MAP#) for indirect parameter lookup. <br /></td></tr>
<tr class="separator:a52fb52bb9fed6f994a5cf6585eb46fb5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af30861148b2621663f5c0e6642fd6ab4" id="r_af30861148b2621663f5c0e6642fd6ab4"><td class="memItemLeft" align="right" valign="top">Double_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#af30861148b2621663f5c0e6642fd6ab4">operator()</a> (const musrfit::ast::function_call &amp;f) const</td></tr>
<tr class="memdesc:af30861148b2621663f5c0e6642fd6ab4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Evaluates a function call (COS, SIN, EXP, SQRT, etc.). <br /></td></tr>
<tr class="separator:af30861148b2621663f5c0e6642fd6ab4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1baed59c088c5071d058ebce29f722fe" id="r_a1baed59c088c5071d058ebce29f722fe"><td class="memItemLeft" align="right" valign="top">Double_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a1baed59c088c5071d058ebce29f722fe">operator()</a> (const musrfit::ast::power_call &amp;p) const</td></tr>
<tr class="memdesc:a1baed59c088c5071d058ebce29f722fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Evaluates a power operation POW(base, exponent). <br /></td></tr>
<tr class="separator:a1baed59c088c5071d058ebce29f722fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad0c74f37411d588c4964775c4d79d5ba" id="r_ad0c74f37411d588c4964775c4d79d5ba"><td class="memItemLeft" align="right" valign="top">Double_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ad0c74f37411d588c4964775c4d79d5ba">operator()</a> (const musrfit::ast::expression &amp;expr) const</td></tr>
<tr class="memdesc:ad0c74f37411d588c4964775c4d79d5ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Evaluates a complete expression with binary operators. <br /></td></tr>
<tr class="separator:ad0c74f37411d588c4964775c4d79d5ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-attribs" name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:ac72ca6501d9829ba98dad1f65ce1647f" id="r_ac72ca6501d9829ba98dad1f65ce1647f"><td class="memItemLeft" align="right" valign="top">const std::vector&lt; Int_t &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ac72ca6501d9829ba98dad1f65ce1647f">fMap</a></td></tr>
<tr class="separator:ac72ca6501d9829ba98dad1f65ce1647f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a781726d9b2926266ec5509c1ff7e7730" id="r_a781726d9b2926266ec5509c1ff7e7730"><td class="memItemLeft" align="right" valign="top">const std::vector&lt; Double_t &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a781726d9b2926266ec5509c1ff7e7730">fParam</a></td></tr>
<tr class="separator:a781726d9b2926266ec5509c1ff7e7730"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1f5659c1a2d05f91e020f931ff16089d" id="r_a1f5659c1a2d05f91e020f931ff16089d"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structPMetaData.html">PMetaData</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a1f5659c1a2d05f91e020f931ff16089d">fMetaData</a></td></tr>
<tr class="separator:a1f5659c1a2d05f91e020f931ff16089d"><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>Visitor class for evaluating the AST. </p>
<p>This visitor traverses the AST and computes the numeric value of the expression. It uses the visitor pattern with boost::static_visitor to handle different AST node types. </p>
<p class="definition">Definition at line <a class="el" href="PFunction_8h_source.html#l00179">179</a> of file <a class="el" href="PFunction_8h_source.html">PFunction.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="acdb868631d6f2d2b268269bf3e72a0c2" name="acdb868631d6f2d2b268269bf3e72a0c2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acdb868631d6f2d2b268269bf3e72a0c2">&#9670;&#160;</a></span>EvalVisitor()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">PFunction::EvalVisitor::EvalVisitor </td>
<td>(</td>
<td class="paramtype">const std::vector&lt; Int_t &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>map</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::vector&lt; Double_t &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>param</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="structPMetaData.html">PMetaData</a> &amp;</td> <td class="paramname"><span class="paramname"><em>metaData</em></span>&#160;)</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel inline">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="PFunction_8h_source.html#l00182">182</a> of file <a class="el" href="PFunction_8h_source.html">PFunction.h</a>.</p>
<p class="reference">References <a class="el" href="PFunction_8h_source.html#l00197">fMap</a>, <a class="el" href="PFunction_8h_source.html#l00199">fMetaData</a>, and <a class="el" href="PFunction_8h_source.html#l00198">fParam</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="aa327bf668a817796245460d51d73fde7" name="aa327bf668a817796245460d51d73fde7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa327bf668a817796245460d51d73fde7">&#9670;&#160;</a></span>operator()() <span class="overload">[1/8]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Double_t PFunction::EvalVisitor::operator() </td>
<td>(</td>
<td class="paramtype">const musrfit::ast::constant &amp;</td> <td class="paramname"><span class="paramname"><em>c</em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Evaluates a constant (PI, GAMMA_MU, B, EN, T#). </p>
<p>Converts symbolic constants to their numeric values, including full support for experimental metadata (magnetic field, energy, temperature).</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">c</td><td>The constant AST node with type, sign, and optional index </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The constant's numeric value (with sign applied if negative) </dd></dl>
<p class="definition">Definition at line <a class="el" href="PFunction_8cpp_source.html#l00451">451</a> of file <a class="el" href="PFunction_8cpp_source.html">PFunction.cpp</a>.</p>
<p class="reference">References <a class="el" href="PFunction_8h_source.html#l00199">fMetaData</a>, and <a class="el" href="PMusr_8h_source.html#l00138">GAMMA_BAR_MUON</a>.</p>
</div>
</div>
<a id="ad0c74f37411d588c4964775c4d79d5ba" name="ad0c74f37411d588c4964775c4d79d5ba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad0c74f37411d588c4964775c4d79d5ba">&#9670;&#160;</a></span>operator()() <span class="overload">[2/8]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Double_t PFunction::EvalVisitor::operator() </td>
<td>(</td>
<td class="paramtype">const musrfit::ast::expression &amp;</td> <td class="paramname"><span class="paramname"><em>e</em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Evaluates a complete expression with binary operators. </p>
<p>Evaluates the first operand, then applies each operation in sequence from left to right. The AST structure encodes operator precedence, so this left-to-right evaluation produces correct results.</p>
<p>Handles division by zero by checking if divisor magnitude is greater than 1e-20; otherwise returns 0.0 for that sub-expression.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">e</td><td>The expression AST node with first operand and operation list </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The computed result of the expression </dd></dl>
<p class="definition">Definition at line <a class="el" href="PFunction_8cpp_source.html#l00649">649</a> of file <a class="el" href="PFunction_8cpp_source.html">PFunction.cpp</a>.</p>
</div>
</div>
<a id="af30861148b2621663f5c0e6642fd6ab4" name="af30861148b2621663f5c0e6642fd6ab4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af30861148b2621663f5c0e6642fd6ab4">&#9670;&#160;</a></span>operator()() <span class="overload">[3/8]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Double_t PFunction::EvalVisitor::operator() </td>
<td>(</td>
<td class="paramtype">const musrfit::ast::function_call &amp;</td> <td class="paramname"><span class="paramname"><em>f</em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Evaluates a function call (COS, SIN, EXP, SQRT, etc.). </p>
<p>Recursively evaluates the argument expression, then applies the specified mathematical function. Supports trigonometric, hyperbolic, inverse, exponential, and logarithmic functions.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">f</td><td>The function call AST node with function ID and argument expression </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The result of applying the mathematical function to the argument </dd></dl>
<p class="definition">Definition at line <a class="el" href="PFunction_8cpp_source.html#l00552">552</a> of file <a class="el" href="PFunction_8cpp_source.html">PFunction.cpp</a>.</p>
</div>
</div>
<a id="a37fc0edbda8b4c40b3f710754f62a622" name="a37fc0edbda8b4c40b3f710754f62a622"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a37fc0edbda8b4c40b3f710754f62a622">&#9670;&#160;</a></span>operator()() <span class="overload">[4/8]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Double_t PFunction::EvalVisitor::operator() </td>
<td>(</td>
<td class="paramtype">const musrfit::ast::leer &amp;</td> <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Evaluates a leer (empty) AST node. </p>
<dl class="section return"><dt>Returns</dt><dd>Always returns 0.0 </dd></dl>
<p class="definition">Definition at line <a class="el" href="PFunction_8cpp_source.html#l00426">426</a> of file <a class="el" href="PFunction_8cpp_source.html">PFunction.cpp</a>.</p>
</div>
</div>
<a id="a52fb52bb9fed6f994a5cf6585eb46fb5" name="a52fb52bb9fed6f994a5cf6585eb46fb5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a52fb52bb9fed6f994a5cf6585eb46fb5">&#9670;&#160;</a></span>operator()() <span class="overload">[5/8]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Double_t PFunction::EvalVisitor::operator() </td>
<td>(</td>
<td class="paramtype">const musrfit::ast::map_ref &amp;</td> <td class="paramname"><span class="paramname"><em>m</em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Evaluates a map reference (MAP#) for indirect parameter lookup. </p>
<p>Performs a two-level lookup: first looks up the map index in fMap, then uses that value to index into fParam. This allows for flexible parameter remapping. Validates both lookups and applies sign.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">m</td><td>The map reference AST node containing map number and sign </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The indirectly referenced parameter value (with sign), or 0.0 if invalid </dd></dl>
<p class="definition">Definition at line <a class="el" href="PFunction_8cpp_source.html#l00522">522</a> of file <a class="el" href="PFunction_8cpp_source.html">PFunction.cpp</a>.</p>
<p class="reference">References <a class="el" href="PFunction_8h_source.html#l00197">fMap</a>, and <a class="el" href="PFunction_8h_source.html#l00198">fParam</a>.</p>
</div>
</div>
<a id="a70eb1bcffe4f9094124e143141c063da" name="a70eb1bcffe4f9094124e143141c063da"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a70eb1bcffe4f9094124e143141c063da">&#9670;&#160;</a></span>operator()() <span class="overload">[6/8]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Double_t PFunction::EvalVisitor::operator() </td>
<td>(</td>
<td class="paramtype">const musrfit::ast::parameter &amp;</td> <td class="paramname"><span class="paramname"><em>p</em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Evaluates a parameter reference (PAR#). </p>
<p>Looks up the parameter value from the fParam vector using the parameter number (1-based indexing in syntax, 0-based in vector). Validates bounds and applies sign.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">p</td><td>The parameter AST node containing number and sign </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The parameter value (with sign applied), or 0.0 if out of bounds </dd></dl>
<p class="definition">Definition at line <a class="el" href="PFunction_8cpp_source.html#l00499">499</a> of file <a class="el" href="PFunction_8cpp_source.html">PFunction.cpp</a>.</p>
<p class="reference">References <a class="el" href="PFunction_8h_source.html#l00198">fParam</a>.</p>
</div>
</div>
<a id="a1baed59c088c5071d058ebce29f722fe" name="a1baed59c088c5071d058ebce29f722fe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1baed59c088c5071d058ebce29f722fe">&#9670;&#160;</a></span>operator()() <span class="overload">[7/8]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Double_t PFunction::EvalVisitor::operator() </td>
<td>(</td>
<td class="paramtype">const musrfit::ast::power_call &amp;</td> <td class="paramname"><span class="paramname"><em>p</em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Evaluates a power operation POW(base, exponent). </p>
<p>Recursively evaluates both the base and exponent expressions, then computes base^exponent using std::pow. Uses absolute value of base to avoid complex number issues with negative bases.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">p</td><td>The power call AST node with base and exponent expressions </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The result of raising the base to the exponent power </dd></dl>
<p class="definition">Definition at line <a class="el" href="PFunction_8cpp_source.html#l00603">603</a> of file <a class="el" href="PFunction_8cpp_source.html">PFunction.cpp</a>.</p>
</div>
</div>
<a id="a3abef7e5172aa81882ff62aa4b64671b" name="a3abef7e5172aa81882ff62aa4b64671b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3abef7e5172aa81882ff62aa4b64671b">&#9670;&#160;</a></span>operator()() <span class="overload">[8/8]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Double_t PFunction::EvalVisitor::operator() </td>
<td>(</td>
<td class="paramtype">double</td> <td class="paramname"><span class="paramname"><em>val</em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Evaluates a numeric literal. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">val</td><td>The literal value from the AST </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The literal value unchanged </dd></dl>
<p class="definition">Definition at line <a class="el" href="PFunction_8cpp_source.html#l00437">437</a> of file <a class="el" href="PFunction_8cpp_source.html">PFunction.cpp</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="ac72ca6501d9829ba98dad1f65ce1647f" name="ac72ca6501d9829ba98dad1f65ce1647f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac72ca6501d9829ba98dad1f65ce1647f">&#9670;&#160;</a></span>fMap</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const std::vector&lt;Int_t&gt;&amp; PFunction::EvalVisitor::fMap</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel private">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="PFunction_8h_source.html#l00197">197</a> of file <a class="el" href="PFunction_8h_source.html">PFunction.h</a>.</p>
<p class="reference">Referenced by <a class="el" href="PFunction_8h_source.html#l00182">EvalVisitor()</a>, and <a class="el" href="PFunction_8cpp_source.html#l00522">operator()()</a>.</p>
</div>
</div>
<a id="a1f5659c1a2d05f91e020f931ff16089d" name="a1f5659c1a2d05f91e020f931ff16089d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1f5659c1a2d05f91e020f931ff16089d">&#9670;&#160;</a></span>fMetaData</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="structPMetaData.html">PMetaData</a>&amp; PFunction::EvalVisitor::fMetaData</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel private">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="PFunction_8h_source.html#l00199">199</a> of file <a class="el" href="PFunction_8h_source.html">PFunction.h</a>.</p>
<p class="reference">Referenced by <a class="el" href="PFunction_8h_source.html#l00182">EvalVisitor()</a>, and <a class="el" href="PFunction_8cpp_source.html#l00451">operator()()</a>.</p>
</div>
</div>
<a id="a781726d9b2926266ec5509c1ff7e7730" name="a781726d9b2926266ec5509c1ff7e7730"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a781726d9b2926266ec5509c1ff7e7730">&#9670;&#160;</a></span>fParam</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const std::vector&lt;Double_t&gt;&amp; PFunction::EvalVisitor::fParam</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel private">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="PFunction_8h_source.html#l00198">198</a> of file <a class="el" href="PFunction_8h_source.html">PFunction.h</a>.</p>
<p class="reference">Referenced by <a class="el" href="PFunction_8h_source.html#l00182">EvalVisitor()</a>, <a class="el" href="PFunction_8cpp_source.html#l00522">operator()()</a>, and <a class="el" href="PFunction_8cpp_source.html#l00499">operator()()</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>/workspace/LMU/musrfit/src/include/<a class="el" href="PFunction_8h_source.html">PFunction.h</a></li>
<li>/workspace/LMU/musrfit/src/classes/<a class="el" href="PFunction_8cpp_source.html">PFunction.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="classPFunction.html">PFunction</a></li><li class="navelem"><a class="el" href="classPFunction_1_1EvalVisitor.html">EvalVisitor</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>
</ul>
</div>
</body>
</html>