root/doc/html/fix_8h-source.html @ 354

Revision 353, 25.7 kB (checked in by smidl, 16 years ago)

doc

Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
3<title>mixpp: fix.h Source File</title>
4<link href="tabs.css" rel="stylesheet" type="text/css">
5<link href="doxygen.css" rel="stylesheet" type="text/css">
6</head><body>
7<!-- Generated by Doxygen 1.5.8 -->
8<script type="text/javascript">
9<!--
10function changeDisplayState (e){
11  var num=this.id.replace(/[^[0-9]/g,'');
12  var button=this.firstChild;
13  var sectionDiv=document.getElementById('dynsection'+num);
14  if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
15    sectionDiv.style.display='block';
16    button.src='open.gif';
17  }else{
18    sectionDiv.style.display='none';
19    button.src='closed.gif';
20  }
21}
22function initDynSections(){
23  var divs=document.getElementsByTagName('div');
24  var sectionCounter=1;
25  for(var i=0;i<divs.length-1;i++){
26    if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
27      var header=divs[i];
28      var section=divs[i+1];
29      var button=header.firstChild;
30      if (button!='IMG'){
31        divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
32        button=document.createElement('img');
33        divs[i].insertBefore(button,divs[i].firstChild);
34      }
35      header.style.cursor='pointer';
36      header.onclick=changeDisplayState;
37      header.id='dynheader'+sectionCounter;
38      button.src='closed.gif';
39      section.id='dynsection'+sectionCounter;
40      section.style.display='none';
41      section.style.marginLeft='14px';
42      sectionCounter++;
43    }
44  }
45}
46window.onload = initDynSections;
47-->
48</script>
49<div class="navigation" id="top">
50  <div class="tabs">
51    <ul>
52      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
53      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
54      <li><a href="modules.html"><span>Modules</span></a></li>
55      <li><a href="annotated.html"><span>Classes</span></a></li>
56      <li class="current"><a href="files.html"><span>Files</span></a></li>
57    </ul>
58  </div>
59  <div class="tabs">
60    <ul>
61      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
62      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
63    </ul>
64  </div>
65<h1>fix.h</h1><a href="fix_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001
66<a name="l00029"></a>00029 <span class="preprocessor">#ifndef FIX_H</span>
67<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#define FIX_H</span>
68<a name="l00031"></a>00031 <span class="preprocessor"></span>
69<a name="l00032"></a>00032 <span class="preprocessor">#include &lt;<a class="code" href="fix__base_8h.html" title="Definitions of a base class for fixed-point data types.">itpp/fixed/fix_base.h</a>&gt;</span>
70<a name="l00033"></a>00033 <span class="preprocessor">#include &lt;<a class="code" href="fix__factory_8h.html" title="Definitions of a class factory for fixed-point data types Fix and CFix.">itpp/fixed/fix_factory.h</a>&gt;</span>
71<a name="l00034"></a>00034
72<a name="l00035"></a>00035
73<a name="l00036"></a>00036 <span class="keyword">namespace </span>itpp
74<a name="l00037"></a>00037 {
75<a name="l00038"></a>00038
76<a name="l00039"></a>00039 <span class="comment">// Forward declarations</span>
77<a name="l00040"></a>00040 <span class="keyword">template</span>&lt;<span class="keyword">class</span> Num_T&gt; <span class="keyword">class </span>Vec;
78<a name="l00041"></a>00041 <span class="keyword">template</span>&lt;<span class="keyword">class</span> Num_T&gt; <span class="keyword">class </span>Mat;
79<a name="l00042"></a>00042
80<a name="l00045"></a>00045
81<a name="l00051"></a><a class="code" href="classitpp_1_1Fix.html">00051</a> <span class="keyword">class </span><a class="code" href="classitpp_1_1Fix.html" title="Fixed-point data type.">Fix</a> : <span class="keyword">public</span> <a class="code" href="classitpp_1_1Fix__Base.html" title="Base class for fixed-point data types.">Fix_Base</a>
82<a name="l00052"></a>00052 {
83<a name="l00053"></a>00053   <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classitpp_1_1CFix.html" title="Complex fixed-point data type.">CFix</a>;
84<a name="l00054"></a>00054   <span class="keyword">template</span>&lt;<span class="keywordtype">int</span>, e_mode, o_mode, q_mode&gt; <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classitpp_1_1Fixed.html" title="Templated fixed-point data type.">Fixed</a>;
85<a name="l00055"></a>00055   <span class="keyword">template</span>&lt;<span class="keywordtype">int</span>, e_mode, o_mode, q_mode&gt; <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classitpp_1_1CFixed.html" title="Templated complex fixed-point data type.">CFixed</a>;
86<a name="l00056"></a>00056 <span class="keyword">public</span>:
87<a name="l00058"></a><a class="code" href="classitpp_1_1Fix.html#00a0be921612389d8b18e9425af553d6">00058</a>   <a class="code" href="classitpp_1_1Fix.html#00a0be921612389d8b18e9425af553d6" title="Default constructor.">Fix</a>(<span class="keywordtype">double</span> x = 0.0, <span class="keywordtype">int</span> s = 0, <span class="keywordtype">int</span> w = <a class="code" href="group__fixed.html#g16660ef1accee4eb3c95d2807c0d7c9c" title="Max word length.">MAX_WORDLEN</a>, <a class="code" href="group__fixed.html#g3a204def662e60bf9bb54d27db09450d" title="Sign encoding modes (aligned with SystemC).">e_mode</a> e = <a class="code" href="group__fixed.html#gg3a204def662e60bf9bb54d27db09450df4bddf5c0c77795974633939360e6e4a" title="Two&amp;#39;s complement.">TC</a>, <a class="code" href="group__fixed.html#g18d0ad4d7280177b761737a7b8b5c45d" title="Overflow modes (aligned with SystemC).">o_mode</a> o = <a class="code" href="group__fixed.html#gg18d0ad4d7280177b761737a7b8b5c45da7ea797d8579a3e2dc82f792e16e946b" title="Wrap-around.">WRAP</a>, <a class="code" href="group__fixed.html#ga644362f0b3d795ce8521326e20fed11" title="Quantization modes (aligned with SystemC).">q_mode</a> q = <a class="code" href="group__fixed.html#gga644362f0b3d795ce8521326e20fed110566af00cff42134b7f719254d07bec1" title="Truncation.">TRN</a>, <a class="code" href="classitpp_1_1Stat.html" title="A class for sampling a signal and calculating statistics.">Stat</a> *ptr = 0)
88<a name="l00059"></a>00059       : <a class="code" href="classitpp_1_1Fix__Base.html" title="Base class for fixed-point data types.">Fix_Base</a>(s, w, e, o, q, ptr), <a class="code" href="classitpp_1_1Fix.html#2658e2053a4f62250f4d36c08deb959e" title="Data representation.">re</a>(<a class="code" href="classitpp_1_1Fix__Base.html#a881bc83f4be90b9f7fb7f87b0953f25" title="Convert from double to fixrep using shift and quantization mode qmode, then call...">scale_and_apply_modes</a>(x)) {}
89<a name="l00061"></a><a class="code" href="classitpp_1_1Fix.html#2993935204b5c93c842b1f240a4a327e">00061</a>   <span class="keyword">explicit</span> <a class="code" href="classitpp_1_1Fix.html#00a0be921612389d8b18e9425af553d6" title="Default constructor.">Fix</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Fix__Factory.html" title="Class factory for fixed-point data types Fix and CFix.">Fix_Factory</a> &amp;f)
90<a name="l00062"></a>00062       : <a class="code" href="classitpp_1_1Fix__Base.html" title="Base class for fixed-point data types.">Fix_Base</a>(0, f.<a class="code" href="classitpp_1_1Fix__Base.html#4872b2d730a546e017a75006a99580a6" title="Word length.">wordlen</a>, f.<a class="code" href="classitpp_1_1Fix__Base.html#9ee6bb0d7811e0ec284c19d6497b0b83" title="Sign encoding mode.">emode</a>, f.<a class="code" href="classitpp_1_1Fix__Base.html#d1b464ea0c3db8fa8c70d9740147ca6c" title="Overflow mode.">omode</a>, f.<a class="code" href="classitpp_1_1Fix__Base.html#cd49b5854e52ef93458f4776e1007b1a" title="Quantization mode.">qmode</a>, f.<a class="code" href="classitpp_1_1Fix__Base.html#a23b1ecd00cd0f0c8fa9b3b5c669a93d" title="Pointer to statistics object.">stat_ptr</a>), <a class="code" href="classitpp_1_1Fix.html#2658e2053a4f62250f4d36c08deb959e" title="Data representation.">re</a>(0) {}
91<a name="l00064"></a><a class="code" href="classitpp_1_1Fix.html#ad36b077c94df04bb22d97d58e83dcbe">00064</a>   <a class="code" href="classitpp_1_1Fix.html#00a0be921612389d8b18e9425af553d6" title="Default constructor.">Fix</a>(<a class="code" href="group__fixed.html#gf3f12ba9f1a5ce9d50ef18fa3b65b5c3" title="Representation for fixed-point data types.">fixrep</a> r, <span class="keywordtype">int</span> s, <span class="keywordtype">int</span>, <span class="keywordtype">int</span>)
92<a name="l00065"></a>00065       : <a class="code" href="classitpp_1_1Fix__Base.html" title="Base class for fixed-point data types.">Fix_Base</a>(s), <a class="code" href="classitpp_1_1Fix.html#2658e2053a4f62250f4d36c08deb959e" title="Data representation.">re</a>(r) {}
93<a name="l00067"></a><a class="code" href="classitpp_1_1Fix.html#b0df67153d49a39bd6c587479d17b4a5">00067</a>   <a class="code" href="classitpp_1_1Fix.html#00a0be921612389d8b18e9425af553d6" title="Default constructor.">Fix</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Fix.html" title="Fixed-point data type.">Fix</a> &amp;x, <span class="keywordtype">int</span> w = <a class="code" href="group__fixed.html#g16660ef1accee4eb3c95d2807c0d7c9c" title="Max word length.">MAX_WORDLEN</a>, <a class="code" href="group__fixed.html#g3a204def662e60bf9bb54d27db09450d" title="Sign encoding modes (aligned with SystemC).">e_mode</a> e = <a class="code" href="group__fixed.html#gg3a204def662e60bf9bb54d27db09450df4bddf5c0c77795974633939360e6e4a" title="Two&amp;#39;s complement.">TC</a>, <a class="code" href="group__fixed.html#g18d0ad4d7280177b761737a7b8b5c45d" title="Overflow modes (aligned with SystemC).">o_mode</a> o = <a class="code" href="group__fixed.html#gg18d0ad4d7280177b761737a7b8b5c45da7ea797d8579a3e2dc82f792e16e946b" title="Wrap-around.">WRAP</a>, <a class="code" href="group__fixed.html#ga644362f0b3d795ce8521326e20fed11" title="Quantization modes (aligned with SystemC).">q_mode</a> q = <a class="code" href="group__fixed.html#gga644362f0b3d795ce8521326e20fed110566af00cff42134b7f719254d07bec1" title="Truncation.">TRN</a>, <a class="code" href="classitpp_1_1Stat.html" title="A class for sampling a signal and calculating statistics.">Stat</a> *ptr = 0)
94<a name="l00068"></a>00068       : <a class="code" href="classitpp_1_1Fix__Base.html" title="Base class for fixed-point data types.">Fix_Base</a>(x.<a class="code" href="classitpp_1_1Fix__Base.html#c42e876a20028d8c7538d6f1d4754d6a" title="Accumulated bitshift (positive means left-shifted, negative means right-shifted)...">shift</a>, w, e, o, q, ptr), <a class="code" href="classitpp_1_1Fix.html#2658e2053a4f62250f4d36c08deb959e" title="Data representation.">re</a>(x.<a class="code" href="classitpp_1_1Fix.html#2658e2053a4f62250f4d36c08deb959e" title="Data representation.">re</a>) {}
95<a name="l00070"></a><a class="code" href="classitpp_1_1Fix.html#bc96406190a47bab2a3a594457b688cf">00070</a>   <span class="keyword">virtual</span> <a class="code" href="classitpp_1_1Fix.html#bc96406190a47bab2a3a594457b688cf" title="Destructor.">~Fix</a>() {}
96<a name="l00071"></a>00071
97<a name="l00073"></a>00073   <a class="code" href="classitpp_1_1Fix.html" title="Fixed-point data type.">Fix</a>&amp; <a class="code" href="classitpp_1_1Fix.html#4b60294dd6f918b8ee60d25ed4fd822a" title="Assignment from Fix.">operator=</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Fix.html" title="Fixed-point data type.">Fix</a> &amp;x);
98<a name="l00075"></a>00075   <a class="code" href="classitpp_1_1Fix.html" title="Fixed-point data type.">Fix</a>&amp; <a class="code" href="classitpp_1_1Fix.html#4b60294dd6f918b8ee60d25ed4fd822a" title="Assignment from Fix.">operator=</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> x);
99<a name="l00077"></a>00077   <a class="code" href="classitpp_1_1Fix.html" title="Fixed-point data type.">Fix</a>&amp; <a class="code" href="classitpp_1_1Fix.html#57625b9d164f4713d57df3162b9ccb42" title="Addition of Fix.">operator+=</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Fix.html" title="Fixed-point data type.">Fix</a> &amp;x);
100<a name="l00079"></a>00079   <a class="code" href="classitpp_1_1Fix.html" title="Fixed-point data type.">Fix</a>&amp; <a class="code" href="classitpp_1_1Fix.html#57625b9d164f4713d57df3162b9ccb42" title="Addition of Fix.">operator+=</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> x);
101<a name="l00081"></a>00081   <a class="code" href="classitpp_1_1Fix.html" title="Fixed-point data type.">Fix</a>&amp; <a class="code" href="classitpp_1_1Fix.html#841540c712fd49eecbad0bdf1a861859" title="Subtraction of Fix.">operator-=</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Fix.html" title="Fixed-point data type.">Fix</a> &amp;x);
102<a name="l00083"></a>00083   <a class="code" href="classitpp_1_1Fix.html" title="Fixed-point data type.">Fix</a>&amp; <a class="code" href="classitpp_1_1Fix.html#841540c712fd49eecbad0bdf1a861859" title="Subtraction of Fix.">operator-=</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> x);
103<a name="l00085"></a>00085   <a class="code" href="classitpp_1_1Fix.html" title="Fixed-point data type.">Fix</a>&amp; <a class="code" href="classitpp_1_1Fix.html#b3415ad75144cbbb5c9d05a00238b85d" title="Multiplication with Fix.">operator*=</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Fix.html" title="Fixed-point data type.">Fix</a> &amp;x);
104<a name="l00087"></a>00087   <a class="code" href="classitpp_1_1Fix.html" title="Fixed-point data type.">Fix</a>&amp; <a class="code" href="classitpp_1_1Fix.html#b3415ad75144cbbb5c9d05a00238b85d" title="Multiplication with Fix.">operator*=</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> x);
105<a name="l00089"></a>00089   <a class="code" href="classitpp_1_1Fix.html" title="Fixed-point data type.">Fix</a>&amp; <a class="code" href="classitpp_1_1Fix.html#1388c88c523e251db89286f1319b7829" title="Division with Fix using quantization mode TRN.">operator/=</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Fix.html" title="Fixed-point data type.">Fix</a> &amp;x);
106<a name="l00091"></a>00091   <a class="code" href="classitpp_1_1Fix.html" title="Fixed-point data type.">Fix</a>&amp; <a class="code" href="classitpp_1_1Fix.html#1388c88c523e251db89286f1319b7829" title="Division with Fix using quantization mode TRN.">operator/=</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> x);
107<a name="l00093"></a>00093   <a class="code" href="classitpp_1_1Fix.html" title="Fixed-point data type.">Fix</a> <a class="code" href="classitpp_1_1Fix.html#fa900b3c25368ca4d23c74937ba3c953" title="Unary negative of Fix.">operator-</a>() <span class="keyword">const</span>;
108<a name="l00095"></a>00095   <a class="code" href="classitpp_1_1Fix.html" title="Fixed-point data type.">Fix</a>&amp; <a class="code" href="classitpp_1_1Fix.html#86271fa2c027aa8a3e3eb2bd87100664" title="Left shift n bits.">operator&lt;&lt;=</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> n);
109<a name="l00097"></a>00097   <a class="code" href="classitpp_1_1Fix.html" title="Fixed-point data type.">Fix</a>&amp; <a class="code" href="classitpp_1_1Fix.html#5e4a9d76367f420074ea06ec6d9ce5ba" title="Right shift n bits using quantization mode qmode (constructor argument).">operator&gt;&gt;=</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> n);
110<a name="l00098"></a>00098
111<a name="l00100"></a>00100   <span class="keywordtype">void</span> <span class="keyword">set</span>(<span class="keywordtype">double</span> x, <span class="keywordtype">int</span> n);
112<a name="l00102"></a>00102   <span class="keywordtype">void</span> <span class="keyword">set</span>(<span class="keywordtype">double</span> x, <span class="keywordtype">int</span> n, <a class="code" href="group__fixed.html#ga644362f0b3d795ce8521326e20fed11" title="Quantization modes (aligned with SystemC).">q_mode</a> q);
113<a name="l00104"></a><a class="code" href="classitpp_1_1Fix.html#b6725f0518898f113d15e722de680a35">00104</a>   <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Fix.html#b6725f0518898f113d15e722de680a35" title="Set data representation (mainly for internal use since it reveals the representation...">set_re</a>(<a class="code" href="group__fixed.html#gf3f12ba9f1a5ce9d50ef18fa3b65b5c3" title="Representation for fixed-point data types.">fixrep</a> x) {<a class="code" href="classitpp_1_1Fix.html#2658e2053a4f62250f4d36c08deb959e" title="Data representation.">re</a> = <a class="code" href="classitpp_1_1Fix__Base.html#d5793faefe33b344b0d74a21ceca81a4" title="Handle overflows using overflow mode omode and make call to statistics object (if...">apply_o_mode</a>(x);}
114<a name="l00105"></a>00105
115<a name="l00107"></a>00107   <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Fix.html#10b44520817964b76b3418e2dd407b5e" title="Left shift n bits.">lshift</a>(<span class="keywordtype">int</span> n);
116<a name="l00109"></a>00109   <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Fix.html#2c31697dd668cf8063b4a65b00fe2593" title="Right shift n bits using quantization mode qmode (constructor argument).">rshift</a>(<span class="keywordtype">int</span> n);
117<a name="l00111"></a>00111   <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Fix.html#2c31697dd668cf8063b4a65b00fe2593" title="Right shift n bits using quantization mode qmode (constructor argument).">rshift</a>(<span class="keywordtype">int</span> n, <a class="code" href="group__fixed.html#ga644362f0b3d795ce8521326e20fed11" title="Quantization modes (aligned with SystemC).">q_mode</a> q);
118<a name="l00112"></a>00112
119<a name="l00114"></a>00114   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Fix.html#0612461dc5e545325d3f94ebaeb91f1e" title="Print restrictions.">print</a>() <span class="keyword">const</span>;
120<a name="l00116"></a><a class="code" href="classitpp_1_1Fix.html#e31446fac0f9777d0654f66d14923d05">00116</a>   <a class="code" href="group__fixed.html#gf3f12ba9f1a5ce9d50ef18fa3b65b5c3" title="Representation for fixed-point data types.">fixrep</a> <a class="code" href="classitpp_1_1Fix.html#e31446fac0f9777d0654f66d14923d05" title="Get data representation (mainly for internal use since it reveals the representation...">get_re</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classitpp_1_1Fix.html#2658e2053a4f62250f4d36c08deb959e" title="Data representation.">re</a>;}
121<a name="l00118"></a>00118   <span class="keywordtype">double</span> <a class="code" href="classitpp_1_1Fix.html#c70b5aad748a582e1ffef293d82e1b58" title="Conversion to double.">unfix</a>() <span class="keyword">const</span>;
122<a name="l00119"></a>00119
123<a name="l00120"></a>00120 <span class="preprocessor">#ifndef NO_IMPLICIT_FIX_CONVERSION</span>
124<a name="l00122"></a><a class="code" href="classitpp_1_1Fix.html#cc4f76eab97dda71e9a8a538c8803284">00122</a> <span class="preprocessor">  operator double() const {</span>
125<a name="l00123"></a>00123 <span class="preprocessor"></span>    <a class="code" href="group__errorhandlingfunc.html#gb319550e696ee9d824d23c2a176bc3a6" title="Abort if t is not true and NDEBUG is not defined.">it_assert_debug</a>(<a class="code" href="classitpp_1_1Fix__Base.html#c42e876a20028d8c7538d6f1d4754d6a" title="Accumulated bitshift (positive means left-shifted, negative means right-shifted)...">shift</a>&gt;=-63 &amp;&amp; <a class="code" href="classitpp_1_1Fix__Base.html#c42e876a20028d8c7538d6f1d4754d6a" title="Accumulated bitshift (positive means left-shifted, negative means right-shifted)...">shift</a> &lt;= 64, <span class="stringliteral">"Fix::operator double: Illegal shift!"</span>);
126<a name="l00124"></a>00124     <span class="keywordflow">return</span> double(<a class="code" href="classitpp_1_1Fix.html#2658e2053a4f62250f4d36c08deb959e" title="Data representation.">re</a>)*<a class="code" href="group__fixed.html#g338980796829ae82ef35b6643a31d441" title="Table for fast multiplication by 2^(n-64).">DOUBLE_POW2</a>[64 - <a class="code" href="classitpp_1_1Fix__Base.html#c42e876a20028d8c7538d6f1d4754d6a" title="Accumulated bitshift (positive means left-shifted, negative means right-shifted)...">shift</a>];
127<a name="l00125"></a>00125   }
128<a name="l00126"></a>00126 <span class="preprocessor">#endif</span>
129<a name="l00127"></a>00127 <span class="preprocessor"></span>
130<a name="l00129"></a>00129   <span class="keyword">friend</span> <span class="keywordtype">int</span> <a class="code" href="group__fixed.html#ga9fdd7dc11b39d9dfedbe5f57d904229" title="Check that x.shift==0 OR x==0 OR y==0 and return x.shift.">assert_shifts</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1CFix.html" title="Complex fixed-point data type.">CFix</a> &amp;x, <span class="keyword">const</span> <a class="code" href="classitpp_1_1Fix.html" title="Fixed-point data type.">Fix</a> &amp;y);
131<a name="l00131"></a>00131   <span class="keyword">friend</span> <span class="keywordtype">int</span> <a class="code" href="group__fixed.html#ga9fdd7dc11b39d9dfedbe5f57d904229" title="Check that x.shift==0 OR x==0 OR y==0 and return x.shift.">assert_shifts</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Fix.html" title="Fixed-point data type.">Fix</a> &amp;x, <span class="keyword">const</span> <a class="code" href="classitpp_1_1Fix.html" title="Fixed-point data type.">Fix</a> &amp;y);
132<a name="l00133"></a>00133   <span class="keyword">friend</span> <span class="keywordtype">int</span> <a class="code" href="group__fixed.html#ga9fdd7dc11b39d9dfedbe5f57d904229" title="Check that x.shift==0 OR x==0 OR y==0 and return x.shift.">assert_shifts</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Fix.html" title="Fixed-point data type.">Fix</a> &amp;x, <span class="keywordtype">int</span> y);
133<a name="l00134"></a>00134
134<a name="l00135"></a>00135 <span class="keyword">protected</span>:
135<a name="l00137"></a><a class="code" href="classitpp_1_1Fix.html#2658e2053a4f62250f4d36c08deb959e">00137</a>   <a class="code" href="group__fixed.html#gf3f12ba9f1a5ce9d50ef18fa3b65b5c3" title="Representation for fixed-point data types.">fixrep</a> re;
136<a name="l00138"></a>00138 };
137<a name="l00139"></a>00139
138<a name="l00141"></a>00141 <span class="keywordtype">int</span> <a class="code" href="group__fixed.html#ga9fdd7dc11b39d9dfedbe5f57d904229" title="Check that x.shift==0 OR x==0 OR y==0 and return x.shift.">assert_shifts</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Fix.html" title="Fixed-point data type.">Fix</a> &amp;x, <span class="keyword">const</span> <a class="code" href="classitpp_1_1Fix.html" title="Fixed-point data type.">Fix</a> &amp;y);
139<a name="l00143"></a>00143 <span class="keywordtype">int</span> <a class="code" href="group__fixed.html#ga9fdd7dc11b39d9dfedbe5f57d904229" title="Check that x.shift==0 OR x==0 OR y==0 and return x.shift.">assert_shifts</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Fix.html" title="Fixed-point data type.">Fix</a> &amp;x, <span class="keywordtype">int</span> y);
140<a name="l00144"></a>00144
141<a name="l00146"></a>00146 std::istream &amp;<a class="code" href="classitpp_1_1Array.html#fe07b04bfe22532f04c5584abd66de56" title="Input stream for Array&amp;lt;T&amp;gt;. T must have istream operator&amp;gt;&amp;gt; defined.">operator&gt;&gt;</a>(std::istream &amp;is, <a class="code" href="classitpp_1_1Fix.html" title="Fixed-point data type.">Fix</a> &amp;x);
142<a name="l00148"></a>00148 std::ostream &amp;<a class="code" href="classitpp_1_1Array.html#527a6c86b076ffe554452697e19b8f60" title="Output stream for Array&amp;lt;T&amp;gt;. T must have ostream operator&amp;lt;&amp;lt; defined.">operator&lt;&lt;</a>(std::ostream &amp;os, <span class="keyword">const</span> <a class="code" href="classitpp_1_1Fix.html" title="Fixed-point data type.">Fix</a> &amp;x);
143<a name="l00149"></a>00149
144<a name="l00151"></a><a class="code" href="group__fixed.html#gf4093112bbb02b7c82af656adf439499">00151</a> <span class="keyword">typedef</span> <a class="code" href="classitpp_1_1Vec.html" title="Vector Class (Templated).">Vec&lt;Fix&gt;</a> <a class="code" href="classitpp_1_1Vec.html" title="Vector Class (Templated).">fixvec</a>;
145<a name="l00153"></a><a class="code" href="group__fixed.html#ga6edd9ee2e20c44f90a3bef4cebb07b1">00153</a> <span class="keyword">typedef</span> <a class="code" href="classitpp_1_1Mat.html" title="Matrix Class (Templated).">Mat&lt;Fix&gt;</a> <a class="code" href="classitpp_1_1Mat.html" title="Matrix Class (Templated).">fixmat</a>;
146<a name="l00154"></a>00154
147<a name="l00155"></a>00155 <span class="comment">// Specialization of template definition in vec.cpp</span>
148<a name="l00156"></a>00156 <span class="keyword">template</span>&lt;&gt; <span class="keywordtype">void</span> fixvec::set(<span class="keyword">const</span> <span class="keywordtype">char</span> *values);
149<a name="l00157"></a>00157 <span class="comment">// Specialization of template definition in mat.cpp</span>
150<a name="l00158"></a>00158 <span class="keyword">template</span>&lt;&gt; <span class="keywordtype">void</span> fixmat::set(<span class="keyword">const</span> <span class="keywordtype">char</span> *values);
151<a name="l00159"></a>00159
152<a name="l00161"></a>00161
153<a name="l00162"></a>00162 } <span class="comment">// namespace itpp</span>
154<a name="l00163"></a>00163
155<a name="l00164"></a>00164 <span class="preprocessor">#endif // #ifndef FIX_H</span>
156</pre></div></div>
157<hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10:02:11 2009 for mixpp by&nbsp;
158<a href="http://www.doxygen.org/index.html">
159<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
160</body>
161</html>
Note: See TracBrowser for help on using the browser.