Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > by-pkgid > aaf33964de706a538481c929c1da6a44 > files > 4903

faust-doc-0.9.10-5mdv2010.1.x86_64.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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"/>
<title>FAUST compiler: occurences.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>occurences.cpp File Reference</h1><code>#include &lt;assert.h&gt;</code><br/>
<code>#include &lt;stdlib.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="recursivness_8hh_source.html">recursivness.hh</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="occurences_8hh_source.html">occurences.hh</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="sigtype_8hh_source.html">sigtype.hh</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="sigtyperules_8hh_source.html">sigtyperules.hh</a>&quot;</code><br/>
<code>#include &lt;iostream&gt;</code><br/>
<div class="dynheader">
Include dependency graph for occurences.cpp:</div>
<div class="dynsection">
</div>

<p><a href="occurences_8cpp_source.html">Go to the source code of this file.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="occurences_8cpp.html#a2f6322a763105adcb9cefcf365d6769f">xVariability</a> (int v, int r)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Extended Variability with recursiveness indication.  <a href="#a2f6322a763105adcb9cefcf365d6769f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="occurences_8cpp.html#aa9065b39904397aad91ca561ca539b79">position</a> (<a class="el" href="classCTree.html">Tree</a> env, <a class="el" href="classCTree.html">Tree</a> t, int p)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">return the position of a signal in the current recursive environment  <a href="#aa9065b39904397aad91ca561ca539b79"></a><br/></td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="aa9065b39904397aad91ca561ca539b79"></a><!-- doxytag: member="occurences.cpp::position" ref="aa9065b39904397aad91ca561ca539b79" args="(Tree env, Tree t, int p)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static int position </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classCTree.html">Tree</a>&nbsp;</td>
          <td class="paramname"> <em>env</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classCTree.html">Tree</a>&nbsp;</td>
          <td class="paramname"> <em>t</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>p</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>return the position of a signal in the current recursive environment </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>env</em>&nbsp;</td><td>the current recursive environment of the signal </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>t</em>&nbsp;</td><td>signal we want to know the position </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the position in the recursive environment </dd></dl>

<p>Definition at line <a class="el" href="occurences_8cpp_source.html#l00161">161</a> of file <a class="el" href="occurences_8cpp_source.html">occurences.cpp</a>.</p>

<p>References <a class="el" href="list_8hh_source.html#l00133">hd()</a>, <a class="el" href="list_8hh_source.html#l00137">isNil()</a>, and <a class="el" href="list_8hh_source.html#l00134">tl()</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00162"></a>00162 {
<a name="l00163"></a>00163     <span class="keywordflow">if</span> (<a class="code" href="list_8hh.html#a2569c3a07bbbfa55e0afde62de62aeec">isNil</a>(env)) <span class="keywordflow">return</span> 0;   <span class="comment">// was not in the environment</span>
<a name="l00164"></a>00164     <span class="keywordflow">if</span> (<a class="code" href="list_8hh.html#a067ad6f83087b420a1c44e48e56be389">hd</a>(env) == t) <span class="keywordflow">return</span> p;
<a name="l00165"></a>00165     <span class="keywordflow">else</span> <span class="keywordflow">return</span> <a class="code" href="occurences_8cpp.html#aa9065b39904397aad91ca561ca539b79" title="return the position of a signal in the current recursive environment">position</a> (<a class="code" href="list_8hh.html#a4075748f5c7156306ec898795313a2e0">tl</a>(env), t, p+1);
<a name="l00166"></a>00166 }
</pre></div></p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
</div>
</p>

</div>
</div>
<a class="anchor" id="a2f6322a763105adcb9cefcf365d6769f"></a><!-- doxytag: member="occurences.cpp::xVariability" ref="a2f6322a763105adcb9cefcf365d6769f" args="(int v, int r)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static int xVariability </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>v</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>r</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Extended Variability with recursiveness indication. </p>

<p>Definition at line <a class="el" href="occurences_8cpp_source.html#l00014">14</a> of file <a class="el" href="occurences_8cpp_source.html">occurences.cpp</a>.</p>

<p>References <a class="el" href="interval_8hh_source.html#l00059">min()</a>.</p>

<p>Referenced by <a class="el" href="occurences_8cpp_source.html#l00034">Occurences::incOccurences()</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00015"></a>00015 {
<a name="l00016"></a>00016     <span class="comment">//cerr &lt;&lt; &quot;xVariability (&quot; &lt;&lt; v &lt;&lt; &quot;, &quot; &lt;&lt;  r &lt;&lt; &quot;)&quot; &lt;&lt; endl;</span>
<a name="l00017"></a>00017     <span class="comment">//assert (v &lt; 3);               // kKonst=0, kBlock=1, kSamp=2</span>
<a name="l00018"></a>00018     <span class="comment">//assert(r==0 | v==2);</span>
<a name="l00019"></a>00019     <span class="keywordflow">if</span> (r&gt;1) r=1;
<a name="l00020"></a>00020     <span class="keywordflow">return</span> <a class="code" href="interval_8hh.html#a2f8edc4561e9744ed4233b205fa7ec32">min</a>(3, v + r);
<a name="l00021"></a>00021 }
</pre></div></p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
</div>
</p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dynsection">
</div>
</p>

</div>
</div>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Thu Apr 29 00:00:09 2010 for FAUST compiler by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>