annotate C++/api/html/index.html @ 627:7c82250c8dd2

Just update AGC param generation.
author dicklyon@google.com
date Thu, 23 May 2013 04:28:43 +0000
parents 97976133eb4d
children
rev   line source
flatmax@592 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
flatmax@592 2 <html xmlns="http://www.w3.org/1999/xhtml">
flatmax@592 3 <head>
flatmax@592 4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
flatmax@592 5 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
flatmax@592 6 <title>CARFAC C++: CARFAC C++</title>
flatmax@592 7
flatmax@592 8 <link href="tabs.css" rel="stylesheet" type="text/css"/>
flatmax@592 9 <link href="doxygen.css" rel="stylesheet" type="text/css" />
flatmax@592 10 <link href="navtree.css" rel="stylesheet" type="text/css"/>
flatmax@592 11 <script type="text/javascript" src="jquery.js"></script>
flatmax@592 12 <script type="text/javascript" src="resize.js"></script>
flatmax@592 13 <script type="text/javascript" src="navtree.js"></script>
flatmax@592 14 <script type="text/javascript">
flatmax@592 15 $(document).ready(initResizable);
flatmax@592 16 </script>
flatmax@592 17 <link href="search/search.css" rel="stylesheet" type="text/css"/>
flatmax@592 18 <script type="text/javascript" src="search/search.js"></script>
flatmax@592 19 <script type="text/javascript">
flatmax@592 20 $(document).ready(function() { searchBox.OnSelectItem(0); });
flatmax@592 21 </script>
flatmax@592 22
flatmax@592 23 </head>
flatmax@592 24 <body>
flatmax@592 25 <div id="top"><!-- do not remove this div! -->
flatmax@592 26
flatmax@592 27
flatmax@592 28 <div id="titlearea">
flatmax@592 29 <table cellspacing="0" cellpadding="0">
flatmax@592 30 <tbody>
flatmax@592 31 <tr style="height: 56px;">
flatmax@592 32
flatmax@592 33 <td id="projectlogo"><img alt="Logo" src="icon.png"/></td>
flatmax@592 34
flatmax@592 35
flatmax@592 36 <td style="padding-left: 0.5em;">
flatmax@592 37 <div id="projectname">CARFAC C++
flatmax@592 38
flatmax@592 39 </div>
flatmax@592 40 <div id="projectbrief">C++ implementation of CARFAC</div>
flatmax@592 41 </td>
flatmax@592 42
flatmax@592 43
flatmax@592 44
flatmax@592 45 </tr>
flatmax@592 46 </tbody>
flatmax@592 47 </table>
flatmax@592 48 </div>
flatmax@592 49
flatmax@592 50 <!-- Generated by Doxygen 1.7.6.1 -->
flatmax@592 51 <script type="text/javascript">
flatmax@592 52 var searchBox = new SearchBox("searchBox", "search",false,'Search');
flatmax@592 53 </script>
flatmax@592 54 <div id="navrow1" class="tabs">
flatmax@592 55 <ul class="tablist">
flatmax@592 56 <li class="current"><a href="index.html"><span>Main&#160;Page</span></a></li>
flatmax@592 57 <li><a href="annotated.html"><span>Classes</span></a></li>
flatmax@592 58 <li><a href="files.html"><span>Files</span></a></li>
flatmax@592 59 <li>
flatmax@592 60 <div id="MSearchBox" class="MSearchBoxInactive">
flatmax@592 61 <span class="left">
flatmax@592 62 <img id="MSearchSelect" src="search/mag_sel.png"
flatmax@592 63 onmouseover="return searchBox.OnSearchSelectShow()"
flatmax@592 64 onmouseout="return searchBox.OnSearchSelectHide()"
flatmax@592 65 alt=""/>
flatmax@592 66 <input type="text" id="MSearchField" value="Search" accesskey="S"
flatmax@592 67 onfocus="searchBox.OnSearchFieldFocus(true)"
flatmax@592 68 onblur="searchBox.OnSearchFieldFocus(false)"
flatmax@592 69 onkeyup="searchBox.OnSearchFieldChange(event)"/>
flatmax@592 70 </span><span class="right">
flatmax@592 71 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
flatmax@592 72 </span>
flatmax@592 73 </div>
flatmax@592 74 </li>
flatmax@592 75 </ul>
flatmax@592 76 </div>
flatmax@592 77 </div>
flatmax@592 78 <div id="side-nav" class="ui-resizable side-nav-resizable">
flatmax@592 79 <div id="nav-tree">
flatmax@592 80 <div id="nav-tree-contents">
flatmax@592 81 </div>
flatmax@592 82 </div>
flatmax@592 83 <div id="splitbar" style="-moz-user-select:none;"
flatmax@592 84 class="ui-resizable-handle">
flatmax@592 85 </div>
flatmax@592 86 </div>
flatmax@592 87 <script type="text/javascript">
flatmax@592 88 initNavTree('index.html','');
flatmax@592 89 </script>
flatmax@592 90 <div id="doc-content">
flatmax@592 91 <div class="header">
flatmax@592 92 <div class="headertitle">
flatmax@592 93 <div class="title">CARFAC C++ </div> </div>
flatmax@592 94 </div><!--header-->
flatmax@592 95 <div class="contents">
flatmax@592 96 <div class="textblock"><dl class="author"><dt><b>Author:</b></dt><dd>{Matt Flax &lt;flatmax@&gt;} </dd></dl>
flatmax@592 97 <dl class="date"><dt><b>Date:</b></dt><dd>2013.02.08</dd></dl>
flatmax@592 98 <h2><a class="anchor" id="intro_sec"></a>
flatmax@592 99 Introduction</h2>
flatmax@592 100 <p>This C++ code implements Dick Lyon's CARFAC model for the peripheral hearing circuit.</p>
flatmax@592 101 <h2><a class="anchor" id="code_philo"></a>
flatmax@592 102 Philosophy of the implementation</h2>
flatmax@592 103 <h3><a class="anchor" id="dd"></a>
flatmax@592 104 Matching the design document</h3>
flatmax@592 105 <p>As requested by the CARFAC design description, this codebase uses Eigen to compute matrix/vector operations.</p>
flatmax@592 106 <h3><a class="anchor" id="oo"></a>
flatmax@592 107 Object oriented acritecture</h3>
flatmax@592 108 <p>Where possible common paradigms inherit from common Objects. This aims to minimise the amount of coding required to implement and modify CARFAC. For example, the <a class="el" href="classEarComponent.html">EarComponent</a> encapsulates the <a class="el" href="classCAR.html">CAR</a>, <a class="el" href="classAGC.html">AGC</a> and <a class="el" href="classIHC.html">IHC</a> where all of the have the common features of <a class="el" href="classCoefficients.html">Coefficients</a>, <a class="el" href="classParameters.html">Parameters</a> and <a class="el" href="classState.html">State</a>.</p>
flatmax@592 109 <h3><a class="anchor" id="cc"></a>
flatmax@592 110 Common code</h3>
flatmax@592 111 <p>Where possible typedefs, definitions, includes and namespace inclusions which are common to the code, or usefull outside of class definitions are put in the <a class="el" href="CARFACCommon_8H.html">CARFACCommon.H</a> file.</p>
flatmax@592 112 <h3><a class="anchor" id="fileNames"></a>
flatmax@592 113 File naming convention and header guards</h3>
flatmax@592 114 <p>C++ files in this codebase are named using the .C and .H suffixes (C code uses .c and .h).</p>
flatmax@592 115 <p>Header guards are labeled using the files name with '_' characters, for example.H would become EXAMPLE_H_.</p>
flatmax@592 116 <h3><a class="anchor" id="globalVars"></a>
flatmax@592 117 Global variables</h3>
flatmax@592 118 <p>In general the use of global variables is discouraged. Where possible the code must be instantiated many times on the same computer system and the use of global variables complicates having multiple instances of shared library classes.</p>
flatmax@592 119 <h3><a class="anchor" id="cvns"></a>
flatmax@592 120 Class and variable naming convention</h3>
flatmax@592 121 <p>In general, classes begin with capitol letters and a variable name begis with a lower case character. The consider a class for example :</p>
flatmax@592 122 <div class="fragment"><pre class="fragment"> <span class="keyword">class </span>ForExample { <span class="keyword">class </span>def here };
flatmax@592 123
flatmax@592 124 ForExample forExample;
flatmax@592 125
flatmax@592 126 <span class="keyword">class </span>OMG { <span class="keyword">class </span>def here };
flatmax@592 127
flatmax@592 128 OMG omg; <span class="comment">// here it is clear what is the type and what is the variable.</span>
flatmax@592 129 </pre></div><p>The class 'ForExample' is defined, and the variable name 'forExample' may be used in the code, which clearly indicates the type of the variable.</p>
flatmax@592 130 <p>The concept of labeling variables using 'p' for pointer, and type name references is not necessary, and in some cases discouraged. Consider for example, </p>
flatmax@592 131 <div class="fragment"><pre class="fragment"> <span class="keywordtype">float</span> *fs
flatmax@592 132 </pre></div><p> defining the pointer to the sample rate. If we were to use </p>
flatmax@592 133 <div class="fragment"><pre class="fragment"> <span class="keywordtype">float</span> * pFFs <span class="comment">// don&#39;t do this - difficult to see that pFFs references fs - the sample rate </span>
flatmax@592 134 </pre></div><p> , it becomes rather difficult to understand that pFFs actualy points to the sample rate.</p>
flatmax@592 135 <p>A deeper argument for using simple variable names (in C++) is as follows. Good engineers program classes and methods which are short and concise. As monitors (LCDs) get larger, most of your methods and in some cases classes are visible in one or two pages of your monitor. Consequently if the exact type of a variable named 'fs' needs to be found, it is as simple as looking at the top of your monitor or scrolling up a little to find a method's input variable name/type. In the case of class member variables, a class 'SoundCard' is expected to define a sound card. Consequently certain member variables are expected to exist, for example, fs, inputChannels, outputChannels and so on. If the actual types of these variables have been forgotten, then the header file is referenced, and this is normally as simple as a few key strokes to change from the SoundCard.C file to the SoundCard.H file to inspect the names and types of available member variables.</p>
flatmax@592 136 <dl class="copyright"><dt><b>Copyright:</b></dt><dd>{ <div class="fragment"><pre class="fragment"> Copyright 2013 Matt R. Flax &lt;flatmax\@&gt; All Rights Reserved.
flatmax@592 137
flatmax@592 138 Author Matt Flax &lt;flatmax@&gt;
flatmax@592 139
flatmax@592 140
flatmax@592 141 This C++ file is part of an implementation of Lyon<span class="stringliteral">&#39;s cochlear model:</span>
flatmax@592 142 <span class="stringliteral"></span>
flatmax@592 143 <span class="stringliteral"> &quot;Cascade of Asymmetric Resonators with Fast-Acting Compression&quot;</span>
flatmax@592 144 <span class="stringliteral"></span>
flatmax@592 145 <span class="stringliteral"> to supplement Lyon&#39;</span>s upcoming book <span class="stringliteral">&quot;Human and Machine Hearing&quot;</span>
flatmax@592 146
flatmax@592 147
flatmax@592 148 Licensed under the Apache License, Version 2.0 (the <span class="stringliteral">&quot;License&quot;</span>);
flatmax@592 149
flatmax@592 150 you may not use <span class="keyword">this</span> file except in compliance with the License.
flatmax@592 151
flatmax@592 152 You may obtain a copy of the License at
flatmax@592 153
flatmax@592 154
flatmax@592 155 http:<span class="comment">//www.apache.org/licenses/LICENSE-2.0</span>
flatmax@592 156
flatmax@592 157
flatmax@592 158 Unless required by applicable law or agreed to in writing, software
flatmax@592 159
flatmax@592 160 distributed under the License is distributed on an <span class="stringliteral">&quot;AS IS&quot;</span> BASIS,
flatmax@592 161
flatmax@592 162 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
flatmax@592 163
flatmax@592 164 See the License <span class="keywordflow">for</span> the specific language governing permissions and
flatmax@592 165
flatmax@592 166 limitations under the License.
flatmax@592 167 </pre></div>} </dd></dl>
flatmax@592 168 </div></div><!-- contents -->
flatmax@592 169 <!-- window showing the filter options -->
flatmax@592 170 <div id="MSearchSelectWindow"
flatmax@592 171 onmouseover="return searchBox.OnSearchSelectShow()"
flatmax@592 172 onmouseout="return searchBox.OnSearchSelectHide()"
flatmax@592 173 onkeydown="return searchBox.OnSearchSelectKey(event)">
flatmax@594 174 <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
flatmax@592 175
flatmax@592 176 <!-- iframe showing the search results (closed by default) -->
flatmax@592 177 <div id="MSearchResultsWindow">
flatmax@592 178 <iframe src="javascript:void(0)" frameborder="0"
flatmax@592 179 name="MSearchResults" id="MSearchResults">
flatmax@592 180 </iframe>
flatmax@592 181 </div>
flatmax@592 182
flatmax@592 183 </div>
flatmax@592 184 <div id="nav-path" class="navpath">
flatmax@592 185 <ul>
flatmax@592 186
flatmax@594 187 <li class="footer">Generated on Thu Feb 21 2013 09:31:11 for CARFAC C++ by
flatmax@592 188 <a href="http://www.doxygen.org/index.html">
flatmax@592 189 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
flatmax@592 190 </ul>
flatmax@592 191 </div>
flatmax@592 192
flatmax@592 193
flatmax@592 194 </body>
flatmax@592 195 </html>