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: Logarithmic and Exponential Functions</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 | <!-- |
---|
10 | function 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 | } |
---|
22 | function 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 | } |
---|
46 | window.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 Page</span></a></li> |
---|
53 | <li><a href="pages.html"><span>Related 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><a href="files.html"><span>Files</span></a></li> |
---|
57 | </ul> |
---|
58 | </div> |
---|
59 | </div> |
---|
60 | <div class="contents"> |
---|
61 | <h1>Logarithmic and Exponential Functions<br> |
---|
62 | <small> |
---|
63 | [<a class="el" href="group__math.html">Auxiliary math functions</a>]</small> |
---|
64 | </h1><table border="0" cellpadding="0" cellspacing="0"> |
---|
65 | <tr><td></td></tr> |
---|
66 | <tr><td colspan="2"><br><h2>Functions</h2></td></tr> |
---|
67 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g5275297e979272e5102fa31f0fc782b4"></a><!-- doxytag: member="logexpfunc::logb" ref="g5275297e979272e5102fa31f0fc782b4" args="(double b, double x)" --> |
---|
68 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#g5275297e979272e5102fa31f0fc782b4">itpp::logb</a> (double b, double x)</td></tr> |
---|
69 | |
---|
70 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Base-b logarithm. <br></td></tr> |
---|
71 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g44da7c49dc0f990f661404a47e2bf9be"></a><!-- doxytag: member="logexpfunc::pow2i" ref="g44da7c49dc0f990f661404a47e2bf9be" args="(int x)" --> |
---|
72 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#g44da7c49dc0f990f661404a47e2bf9be">itpp::pow2i</a> (int x)</td></tr> |
---|
73 | |
---|
74 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculate two to the power of x (2^x); x is integer. <br></td></tr> |
---|
75 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g84ee8bfb44de3c26fdcb756ecb21d9e9"></a><!-- doxytag: member="logexpfunc::pow2" ref="g84ee8bfb44de3c26fdcb756ecb21d9e9" args="(double x)" --> |
---|
76 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#g84ee8bfb44de3c26fdcb756ecb21d9e9">itpp::pow2</a> (double x)</td></tr> |
---|
77 | |
---|
78 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculate two to the power of x (2^x). <br></td></tr> |
---|
79 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gc5653517728e4837a91131655b4a18da"></a><!-- doxytag: member="logexpfunc::pow10" ref="gc5653517728e4837a91131655b4a18da" args="(double x)" --> |
---|
80 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#gc5653517728e4837a91131655b4a18da">itpp::pow10</a> (double x)</td></tr> |
---|
81 | |
---|
82 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculate ten to the power of x (10^x). <br></td></tr> |
---|
83 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g5c448e69f3678181e108e1caead5c28b"></a><!-- doxytag: member="logexpfunc::dB" ref="g5c448e69f3678181e108e1caead5c28b" args="(double x)" --> |
---|
84 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#g5c448e69f3678181e108e1caead5c28b">itpp::dB</a> (double x)</td></tr> |
---|
85 | |
---|
86 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Decibel of x (10*log10(x)). <br></td></tr> |
---|
87 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g9a4a3d1188d2ec6a6815c237bd3ab2cc"></a><!-- doxytag: member="logexpfunc::inv_dB" ref="g9a4a3d1188d2ec6a6815c237bd3ab2cc" args="(double x)" --> |
---|
88 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#g9a4a3d1188d2ec6a6815c237bd3ab2cc">itpp::inv_dB</a> (double x)</td></tr> |
---|
89 | |
---|
90 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Inverse of decibel of x. <br></td></tr> |
---|
91 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g70cf103d3f9443eb852db037115cd709"></a><!-- doxytag: member="logexpfunc::int2bits" ref="g70cf103d3f9443eb852db037115cd709" args="(int n)" --> |
---|
92 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#g70cf103d3f9443eb852db037115cd709">itpp::int2bits</a> (int n)</td></tr> |
---|
93 | |
---|
94 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculate the number of bits needed to represent an inteager <code>n</code>. <br></td></tr> |
---|
95 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gef5f3fac5ff2afee6458ea7901323c61"></a><!-- doxytag: member="logexpfunc::levels2bits" ref="gef5f3fac5ff2afee6458ea7901323c61" args="(int n)" --> |
---|
96 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#gef5f3fac5ff2afee6458ea7901323c61">itpp::levels2bits</a> (int n)</td></tr> |
---|
97 | |
---|
98 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculate the number of bits needed to represent <code>n</code> different values (levels). <br></td></tr> |
---|
99 | <tr><td class="memItemLeft" nowrap align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#g02907e0ed7d04cde3a43e2a9d00c24c0">itpp::trunc_log</a> (double x)</td></tr> |
---|
100 | |
---|
101 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Truncated natural logarithm function. <a href="#g02907e0ed7d04cde3a43e2a9d00c24c0"></a><br></td></tr> |
---|
102 | <tr><td class="memItemLeft" nowrap align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#ga62c8362aeeb68ba0fc65c99267bd1fd">itpp::trunc_exp</a> (double x)</td></tr> |
---|
103 | |
---|
104 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Truncated exponential function. <a href="#ga62c8362aeeb68ba0fc65c99267bd1fd"></a><br></td></tr> |
---|
105 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g1b295e7695ab2a3290bfadb26a149304"></a><!-- doxytag: member="logexpfunc::log_add" ref="g1b295e7695ab2a3290bfadb26a149304" args="(double log_a, double log_b)" --> |
---|
106 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#g1b295e7695ab2a3290bfadb26a149304">itpp::log_add</a> (double log_a, double log_b)</td></tr> |
---|
107 | |
---|
108 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Safe substitute for <code>log(exp(log_a) + exp(log_b))</code>. <br></td></tr> |
---|
109 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gc1495ce5d82dc54376a5550ccc76df7a"></a><!-- doxytag: member="logexpfunc::exp" ref="gc1495ce5d82dc54376a5550ccc76df7a" args="(const vec &x)" --> |
---|
110 | <a class="el" href="classitpp_1_1Vec.html#02e1bb55f60f3c2eb7a020eb1c2cfcf4">vec</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#gc1495ce5d82dc54376a5550ccc76df7a">itpp::exp</a> (const <a class="el" href="classitpp_1_1Vec.html#02e1bb55f60f3c2eb7a020eb1c2cfcf4">vec</a> &x)</td></tr> |
---|
111 | |
---|
112 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Exp of the elements of a vector <code>x</code>. <br></td></tr> |
---|
113 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gd4f099ec6f7ad0489d088d815247829c"></a><!-- doxytag: member="logexpfunc::exp" ref="gd4f099ec6f7ad0489d088d815247829c" args="(const cvec &x)" --> |
---|
114 | <a class="el" href="classitpp_1_1Vec.html#e83c1408740e41a7e29c383b71d4d544">cvec</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#gd4f099ec6f7ad0489d088d815247829c">itpp::exp</a> (const <a class="el" href="classitpp_1_1Vec.html#e83c1408740e41a7e29c383b71d4d544">cvec</a> &x)</td></tr> |
---|
115 | |
---|
116 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Exp of the elements of a complex vector <code>x</code>. <br></td></tr> |
---|
117 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g42899b4c00b0b5e703ac8dfe04b18ac1"></a><!-- doxytag: member="logexpfunc::exp" ref="g42899b4c00b0b5e703ac8dfe04b18ac1" args="(const mat &m)" --> |
---|
118 | <a class="el" href="classitpp_1_1Mat.html#6bba394f181c76fda12759568986c613">mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#g42899b4c00b0b5e703ac8dfe04b18ac1">itpp::exp</a> (const <a class="el" href="classitpp_1_1Mat.html#6bba394f181c76fda12759568986c613">mat</a> &m)</td></tr> |
---|
119 | |
---|
120 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Exp of the elements of a matrix <code>m</code>. <br></td></tr> |
---|
121 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g7a3da29d4e6a8c814237453086793335"></a><!-- doxytag: member="logexpfunc::exp" ref="g7a3da29d4e6a8c814237453086793335" args="(const cmat &m)" --> |
---|
122 | <a class="el" href="classitpp_1_1Mat.html#6fbac4b7184807da188e5b85d42f038b">cmat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#g7a3da29d4e6a8c814237453086793335">itpp::exp</a> (const <a class="el" href="classitpp_1_1Mat.html#6fbac4b7184807da188e5b85d42f038b">cmat</a> &m)</td></tr> |
---|
123 | |
---|
124 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Exp of the elements of a complex matrix <code>m</code>. <br></td></tr> |
---|
125 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g0c42d158b1f623f9b72c1ccde7e2fd09"></a><!-- doxytag: member="logexpfunc::pow" ref="g0c42d158b1f623f9b72c1ccde7e2fd09" args="(const double x, const vec &y)" --> |
---|
126 | <a class="el" href="classitpp_1_1Vec.html#02e1bb55f60f3c2eb7a020eb1c2cfcf4">vec</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#g0c42d158b1f623f9b72c1ccde7e2fd09">itpp::pow</a> (const double x, const <a class="el" href="classitpp_1_1Vec.html#02e1bb55f60f3c2eb7a020eb1c2cfcf4">vec</a> &y)</td></tr> |
---|
127 | |
---|
128 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculates x to the power of y (x^y). <br></td></tr> |
---|
129 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g0c153229b93549e8a6449327a92c934f"></a><!-- doxytag: member="logexpfunc::pow" ref="g0c153229b93549e8a6449327a92c934f" args="(const double x, const mat &y)" --> |
---|
130 | <a class="el" href="classitpp_1_1Mat.html#6bba394f181c76fda12759568986c613">mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#g0c153229b93549e8a6449327a92c934f">itpp::pow</a> (const double x, const <a class="el" href="classitpp_1_1Mat.html#6bba394f181c76fda12759568986c613">mat</a> &y)</td></tr> |
---|
131 | |
---|
132 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculates x to the power of y (x^y). <br></td></tr> |
---|
133 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g9bd8947c2d1056f05812670491668241"></a><!-- doxytag: member="logexpfunc::pow" ref="g9bd8947c2d1056f05812670491668241" args="(const vec &x, const double y)" --> |
---|
134 | <a class="el" href="classitpp_1_1Vec.html#02e1bb55f60f3c2eb7a020eb1c2cfcf4">vec</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#g9bd8947c2d1056f05812670491668241">itpp::pow</a> (const <a class="el" href="classitpp_1_1Vec.html#02e1bb55f60f3c2eb7a020eb1c2cfcf4">vec</a> &x, const double y)</td></tr> |
---|
135 | |
---|
136 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculates x to the power of y (x^y). <br></td></tr> |
---|
137 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g40f48a75172e7f8bc8e58ed54262a04d"></a><!-- doxytag: member="logexpfunc::pow" ref="g40f48a75172e7f8bc8e58ed54262a04d" args="(const mat &x, const double y)" --> |
---|
138 | <a class="el" href="classitpp_1_1Mat.html#6bba394f181c76fda12759568986c613">mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#g40f48a75172e7f8bc8e58ed54262a04d">itpp::pow</a> (const <a class="el" href="classitpp_1_1Mat.html#6bba394f181c76fda12759568986c613">mat</a> &x, const double y)</td></tr> |
---|
139 | |
---|
140 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculates x to the power of y (x^y). <br></td></tr> |
---|
141 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g054afa4559b8fa4e85e557273bdde7ac"></a><!-- doxytag: member="logexpfunc::pow2" ref="g054afa4559b8fa4e85e557273bdde7ac" args="(const vec &x)" --> |
---|
142 | <a class="el" href="classitpp_1_1Vec.html#02e1bb55f60f3c2eb7a020eb1c2cfcf4">vec</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#g054afa4559b8fa4e85e557273bdde7ac">itpp::pow2</a> (const <a class="el" href="classitpp_1_1Vec.html#02e1bb55f60f3c2eb7a020eb1c2cfcf4">vec</a> &x)</td></tr> |
---|
143 | |
---|
144 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculates two to the power of x (2^x). <br></td></tr> |
---|
145 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g0035dfbd1fcffdb28cadacba42ad8996"></a><!-- doxytag: member="logexpfunc::pow2" ref="g0035dfbd1fcffdb28cadacba42ad8996" args="(const mat &x)" --> |
---|
146 | <a class="el" href="classitpp_1_1Mat.html#6bba394f181c76fda12759568986c613">mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#g0035dfbd1fcffdb28cadacba42ad8996">itpp::pow2</a> (const <a class="el" href="classitpp_1_1Mat.html#6bba394f181c76fda12759568986c613">mat</a> &x)</td></tr> |
---|
147 | |
---|
148 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculates two to the power of x (2^x). <br></td></tr> |
---|
149 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ge702eea92311fe090faebc2ec9501854"></a><!-- doxytag: member="logexpfunc::pow10" ref="ge702eea92311fe090faebc2ec9501854" args="(const vec &x)" --> |
---|
150 | <a class="el" href="classitpp_1_1Vec.html#02e1bb55f60f3c2eb7a020eb1c2cfcf4">vec</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#ge702eea92311fe090faebc2ec9501854">itpp::pow10</a> (const <a class="el" href="classitpp_1_1Vec.html#02e1bb55f60f3c2eb7a020eb1c2cfcf4">vec</a> &x)</td></tr> |
---|
151 | |
---|
152 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculates ten to the power of x (10^x). <br></td></tr> |
---|
153 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g4f390e0a4e938e7d9b98613ad66bdf1c"></a><!-- doxytag: member="logexpfunc::pow10" ref="g4f390e0a4e938e7d9b98613ad66bdf1c" args="(const mat &x)" --> |
---|
154 | <a class="el" href="classitpp_1_1Mat.html#6bba394f181c76fda12759568986c613">mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#g4f390e0a4e938e7d9b98613ad66bdf1c">itpp::pow10</a> (const <a class="el" href="classitpp_1_1Mat.html#6bba394f181c76fda12759568986c613">mat</a> &x)</td></tr> |
---|
155 | |
---|
156 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculates ten to the power of x (10^x). <br></td></tr> |
---|
157 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g60e39caa21db1b5f9f6006cf7508fbcb"></a><!-- doxytag: member="logexpfunc::log" ref="g60e39caa21db1b5f9f6006cf7508fbcb" args="(const vec &x)" --> |
---|
158 | <a class="el" href="classitpp_1_1Vec.html#02e1bb55f60f3c2eb7a020eb1c2cfcf4">vec</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#g60e39caa21db1b5f9f6006cf7508fbcb">itpp::log</a> (const <a class="el" href="classitpp_1_1Vec.html#02e1bb55f60f3c2eb7a020eb1c2cfcf4">vec</a> &x)</td></tr> |
---|
159 | |
---|
160 | <tr><td class="mdescLeft"> </td><td class="mdescRight">The natural logarithm of the elements. <br></td></tr> |
---|
161 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g83350f223110246183d90254a7933c75"></a><!-- doxytag: member="logexpfunc::log" ref="g83350f223110246183d90254a7933c75" args="(const mat &x)" --> |
---|
162 | <a class="el" href="classitpp_1_1Mat.html#6bba394f181c76fda12759568986c613">mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#g83350f223110246183d90254a7933c75">itpp::log</a> (const <a class="el" href="classitpp_1_1Mat.html#6bba394f181c76fda12759568986c613">mat</a> &x)</td></tr> |
---|
163 | |
---|
164 | <tr><td class="mdescLeft"> </td><td class="mdescRight">The natural logarithm of the elements. <br></td></tr> |
---|
165 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gc4c7043d21d91e79409c75a732b14c3a"></a><!-- doxytag: member="logexpfunc::log" ref="gc4c7043d21d91e79409c75a732b14c3a" args="(const cvec &x)" --> |
---|
166 | <a class="el" href="classitpp_1_1Vec.html#e83c1408740e41a7e29c383b71d4d544">cvec</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#gc4c7043d21d91e79409c75a732b14c3a">itpp::log</a> (const <a class="el" href="classitpp_1_1Vec.html#e83c1408740e41a7e29c383b71d4d544">cvec</a> &x)</td></tr> |
---|
167 | |
---|
168 | <tr><td class="mdescLeft"> </td><td class="mdescRight">The natural logarithm of the elements. <br></td></tr> |
---|
169 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g320dc9f6d27a6cfe4e149633fd1ea566"></a><!-- doxytag: member="logexpfunc::log" ref="g320dc9f6d27a6cfe4e149633fd1ea566" args="(const cmat &x)" --> |
---|
170 | <a class="el" href="classitpp_1_1Mat.html#6fbac4b7184807da188e5b85d42f038b">cmat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#g320dc9f6d27a6cfe4e149633fd1ea566">itpp::log</a> (const <a class="el" href="classitpp_1_1Mat.html#6fbac4b7184807da188e5b85d42f038b">cmat</a> &x)</td></tr> |
---|
171 | |
---|
172 | <tr><td class="mdescLeft"> </td><td class="mdescRight">The natural logarithm of the elements. <br></td></tr> |
---|
173 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gbaf1eabe626389b5a4aca26b6ef0d86f"></a><!-- doxytag: member="logexpfunc::log2" ref="gbaf1eabe626389b5a4aca26b6ef0d86f" args="(const vec &x)" --> |
---|
174 | <a class="el" href="classitpp_1_1Vec.html#02e1bb55f60f3c2eb7a020eb1c2cfcf4">vec</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#gbaf1eabe626389b5a4aca26b6ef0d86f">itpp::log2</a> (const <a class="el" href="classitpp_1_1Vec.html#02e1bb55f60f3c2eb7a020eb1c2cfcf4">vec</a> &x)</td></tr> |
---|
175 | |
---|
176 | <tr><td class="mdescLeft"> </td><td class="mdescRight">log-2 of the elements <br></td></tr> |
---|
177 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gd50278d885a02a1448976186bb4ad5cd"></a><!-- doxytag: member="logexpfunc::log2" ref="gd50278d885a02a1448976186bb4ad5cd" args="(const mat &x)" --> |
---|
178 | <a class="el" href="classitpp_1_1Mat.html#6bba394f181c76fda12759568986c613">mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#gd50278d885a02a1448976186bb4ad5cd">itpp::log2</a> (const <a class="el" href="classitpp_1_1Mat.html#6bba394f181c76fda12759568986c613">mat</a> &x)</td></tr> |
---|
179 | |
---|
180 | <tr><td class="mdescLeft"> </td><td class="mdescRight">log-2 of the elements <br></td></tr> |
---|
181 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gfc3c7f9e5088c92dff4b569bed1634a8"></a><!-- doxytag: member="logexpfunc::log10" ref="gfc3c7f9e5088c92dff4b569bed1634a8" args="(const vec &x)" --> |
---|
182 | <a class="el" href="classitpp_1_1Vec.html#02e1bb55f60f3c2eb7a020eb1c2cfcf4">vec</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#gfc3c7f9e5088c92dff4b569bed1634a8">itpp::log10</a> (const <a class="el" href="classitpp_1_1Vec.html#02e1bb55f60f3c2eb7a020eb1c2cfcf4">vec</a> &x)</td></tr> |
---|
183 | |
---|
184 | <tr><td class="mdescLeft"> </td><td class="mdescRight">log-10 of the elements <br></td></tr> |
---|
185 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gd24b6c9440eaf8851f2a3173df42a19e"></a><!-- doxytag: member="logexpfunc::log10" ref="gd24b6c9440eaf8851f2a3173df42a19e" args="(const mat &x)" --> |
---|
186 | <a class="el" href="classitpp_1_1Mat.html#6bba394f181c76fda12759568986c613">mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#gd24b6c9440eaf8851f2a3173df42a19e">itpp::log10</a> (const <a class="el" href="classitpp_1_1Mat.html#6bba394f181c76fda12759568986c613">mat</a> &x)</td></tr> |
---|
187 | |
---|
188 | <tr><td class="mdescLeft"> </td><td class="mdescRight">log-10 of the elements <br></td></tr> |
---|
189 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gd0b12b1902cf38b354520884ac18429e"></a><!-- doxytag: member="logexpfunc::logb" ref="gd0b12b1902cf38b354520884ac18429e" args="(double b, const vec &x)" --> |
---|
190 | <a class="el" href="classitpp_1_1Vec.html#02e1bb55f60f3c2eb7a020eb1c2cfcf4">vec</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#gd0b12b1902cf38b354520884ac18429e">itpp::logb</a> (double b, const <a class="el" href="classitpp_1_1Vec.html#02e1bb55f60f3c2eb7a020eb1c2cfcf4">vec</a> &x)</td></tr> |
---|
191 | |
---|
192 | <tr><td class="mdescLeft"> </td><td class="mdescRight">log-b of <code>x</code> <br></td></tr> |
---|
193 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g913e6b2c337604c5ca8991c020a5ab80"></a><!-- doxytag: member="logexpfunc::logb" ref="g913e6b2c337604c5ca8991c020a5ab80" args="(double b, const mat &x)" --> |
---|
194 | <a class="el" href="classitpp_1_1Mat.html#6bba394f181c76fda12759568986c613">mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#g913e6b2c337604c5ca8991c020a5ab80">itpp::logb</a> (double b, const <a class="el" href="classitpp_1_1Mat.html#6bba394f181c76fda12759568986c613">mat</a> &x)</td></tr> |
---|
195 | |
---|
196 | <tr><td class="mdescLeft"> </td><td class="mdescRight">log-b of <code>x</code> <br></td></tr> |
---|
197 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gf6a9b19ce9cb64c65199b3148b1b0469"></a><!-- doxytag: member="logexpfunc::dB" ref="gf6a9b19ce9cb64c65199b3148b1b0469" args="(const vec &x)" --> |
---|
198 | <a class="el" href="classitpp_1_1Vec.html#02e1bb55f60f3c2eb7a020eb1c2cfcf4">vec</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#gf6a9b19ce9cb64c65199b3148b1b0469">itpp::dB</a> (const <a class="el" href="classitpp_1_1Vec.html#02e1bb55f60f3c2eb7a020eb1c2cfcf4">vec</a> &x)</td></tr> |
---|
199 | |
---|
200 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculates 10*log10(x). <br></td></tr> |
---|
201 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g03bd0214373c9505ef89b8886746e189"></a><!-- doxytag: member="logexpfunc::dB" ref="g03bd0214373c9505ef89b8886746e189" args="(const mat &x)" --> |
---|
202 | <a class="el" href="classitpp_1_1Mat.html#6bba394f181c76fda12759568986c613">mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#g03bd0214373c9505ef89b8886746e189">itpp::dB</a> (const <a class="el" href="classitpp_1_1Mat.html#6bba394f181c76fda12759568986c613">mat</a> &x)</td></tr> |
---|
203 | |
---|
204 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculates 10*log10(x). <br></td></tr> |
---|
205 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g250b6ec368bc12844492285a7bb6ed94"></a><!-- doxytag: member="logexpfunc::inv_dB" ref="g250b6ec368bc12844492285a7bb6ed94" args="(const vec &x)" --> |
---|
206 | <a class="el" href="classitpp_1_1Vec.html#02e1bb55f60f3c2eb7a020eb1c2cfcf4">vec</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#g250b6ec368bc12844492285a7bb6ed94">itpp::inv_dB</a> (const <a class="el" href="classitpp_1_1Vec.html#02e1bb55f60f3c2eb7a020eb1c2cfcf4">vec</a> &x)</td></tr> |
---|
207 | |
---|
208 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Calulates the inverse of dB, 10^(x/10). <br></td></tr> |
---|
209 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g5b4a5173187ffcd178523d63253bb312"></a><!-- doxytag: member="logexpfunc::inv_dB" ref="g5b4a5173187ffcd178523d63253bb312" args="(const mat &x)" --> |
---|
210 | <a class="el" href="classitpp_1_1Mat.html#6bba394f181c76fda12759568986c613">mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#g5b4a5173187ffcd178523d63253bb312">itpp::inv_dB</a> (const <a class="el" href="classitpp_1_1Mat.html#6bba394f181c76fda12759568986c613">mat</a> &x)</td></tr> |
---|
211 | |
---|
212 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculates the inverse of dB, 10^(x/10). <br></td></tr> |
---|
213 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gdf1b40ed813a44d3ae68bbbae84b45c6"></a><!-- doxytag: member="logexpfunc::int2bits" ref="gdf1b40ed813a44d3ae68bbbae84b45c6" args="(const ivec &v)" --> |
---|
214 | <a class="el" href="classitpp_1_1Vec.html#b03757d874926a9be91535e71af1656e">ivec</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#gdf1b40ed813a44d3ae68bbbae84b45c6">itpp::int2bits</a> (const <a class="el" href="classitpp_1_1Vec.html#b03757d874926a9be91535e71af1656e">ivec</a> &v)</td></tr> |
---|
215 | |
---|
216 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculate the number of bits needed to represent each inteager in a vector. <br></td></tr> |
---|
217 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g4a774bd5418520f574eddf730333dada"></a><!-- doxytag: member="logexpfunc::levels2bits" ref="g4a774bd5418520f574eddf730333dada" args="(const ivec &v)" --> |
---|
218 | <a class="el" href="classitpp_1_1Vec.html#b03757d874926a9be91535e71af1656e">ivec</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#g4a774bd5418520f574eddf730333dada">itpp::levels2bits</a> (const <a class="el" href="classitpp_1_1Vec.html#b03757d874926a9be91535e71af1656e">ivec</a> &v)</td></tr> |
---|
219 | |
---|
220 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculate the number of bits needed to represent a numer of levels saved in a vector. <br></td></tr> |
---|
221 | <tr><td colspan="2"><br><h2>Variables</h2></td></tr> |
---|
222 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g88c6cb15374a05289feecb35fdcd20f3"></a><!-- doxytag: member="logexpfunc::log_double_max" ref="g88c6cb15374a05289feecb35fdcd20f3" args="" --> |
---|
223 | const double </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#g88c6cb15374a05289feecb35fdcd20f3">itpp::log_double_max</a> = std::log(std::numeric_limits<double>::max())</td></tr> |
---|
224 | |
---|
225 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Constant definition to speed up <a class="el" href="group__logexpfunc.html#g02907e0ed7d04cde3a43e2a9d00c24c0" title="Truncated natural logarithm function.">trunc_log()</a> and <a class="el" href="group__logexpfunc.html#ga62c8362aeeb68ba0fc65c99267bd1fd" title="Truncated exponential function.">trunc_exp()</a>. <br></td></tr> |
---|
226 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g7df3364a77d620d852c447b91dab2c77"></a><!-- doxytag: member="logexpfunc::log_double_min" ref="g7df3364a77d620d852c447b91dab2c77" args="" --> |
---|
227 | const double </td><td class="memItemRight" valign="bottom"><a class="el" href="group__logexpfunc.html#g7df3364a77d620d852c447b91dab2c77">itpp::log_double_min</a> = std::log(std::numeric_limits<double>::min())</td></tr> |
---|
228 | |
---|
229 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Constant definition to speed up <a class="el" href="group__logexpfunc.html#g02907e0ed7d04cde3a43e2a9d00c24c0" title="Truncated natural logarithm function.">trunc_log()</a>, <a class="el" href="group__logexpfunc.html#ga62c8362aeeb68ba0fc65c99267bd1fd" title="Truncated exponential function.">trunc_exp()</a> and <a class="el" href="group__logexpfunc.html#g1b295e7695ab2a3290bfadb26a149304" title="Safe substitute for log(exp(log_a) + exp(log_b)).">log_add()</a>. <br></td></tr> |
---|
230 | </table> |
---|
231 | <hr><h2>Function Documentation</h2> |
---|
232 | <a class="anchor" name="ga62c8362aeeb68ba0fc65c99267bd1fd"></a><!-- doxytag: member="itpp::trunc_exp" ref="ga62c8362aeeb68ba0fc65c99267bd1fd" args="(double x)" --> |
---|
233 | <div class="memitem"> |
---|
234 | <div class="memproto"> |
---|
235 | <table class="memname"> |
---|
236 | <tr> |
---|
237 | <td class="memname">double itpp::trunc_exp </td> |
---|
238 | <td>(</td> |
---|
239 | <td class="paramtype">double </td> |
---|
240 | <td class="paramname"> <em>x</em> </td> |
---|
241 | <td> ) </td> |
---|
242 | <td><code> [inline]</code></td> |
---|
243 | </tr> |
---|
244 | </table> |
---|
245 | </div> |
---|
246 | <div class="memdoc"> |
---|
247 | |
---|
248 | <p> |
---|
249 | Truncated exponential function. |
---|
250 | <p> |
---|
251 | This truncated function provides a solution in the case when the exponent function results in infinity. The function checks for an extreme value and use truncation (saturation) before calculating the result.<p> |
---|
252 | The truncated exponential function can be used when numerical instability problem occurs for a standard exp function. |
---|
253 | <p>References <a class="el" href="log__exp_8h-source.html#l00172">itpp::exp()</a>, <a class="el" href="log__exp_8h-source.html#l00089">itpp::log_double_max</a>, and <a class="el" href="tcp_8h-source.html#l00117">itpp::max()</a>.</p> |
---|
254 | |
---|
255 | <p>Referenced by <a class="el" href="mog__generic_8cpp-source.html#l00596">itpp::MOG_generic::lhood_internal()</a>, <a class="el" href="mog__diag_8cpp-source.html#l00133">itpp::MOG_diag::lhood_internal()</a>, <a class="el" href="rec__syst__conv__code_8cpp-source.html#l00166">itpp::Rec_Syst_Conv_Code::map_decode()</a>, and <a class="el" href="mog__diag__em_8cpp-source.html#l00084">itpp::MOG_diag_EM_sup::ml_update_params()</a>.</p> |
---|
256 | |
---|
257 | </div> |
---|
258 | </div><p> |
---|
259 | <a class="anchor" name="g02907e0ed7d04cde3a43e2a9d00c24c0"></a><!-- doxytag: member="itpp::trunc_log" ref="g02907e0ed7d04cde3a43e2a9d00c24c0" args="(double x)" --> |
---|
260 | <div class="memitem"> |
---|
261 | <div class="memproto"> |
---|
262 | <table class="memname"> |
---|
263 | <tr> |
---|
264 | <td class="memname">double itpp::trunc_log </td> |
---|
265 | <td>(</td> |
---|
266 | <td class="paramtype">double </td> |
---|
267 | <td class="paramname"> <em>x</em> </td> |
---|
268 | <td> ) </td> |
---|
269 | <td><code> [inline]</code></td> |
---|
270 | </tr> |
---|
271 | </table> |
---|
272 | </div> |
---|
273 | <div class="memdoc"> |
---|
274 | |
---|
275 | <p> |
---|
276 | Truncated natural logarithm function. |
---|
277 | <p> |
---|
278 | This truncated function provides a solution in the cases when the logarithm argument is less or equal to zero or infinity. The function checks for such extreme values and use some kind of truncation (saturation) before calculating the logarithm.<p> |
---|
279 | The truncated logarithm function can be used for calculation of log-likelihood in soft demodulators, when numerical instability problem might occur. |
---|
280 | <p>References <a class="el" href="log__exp_8h-source.html#l00236">itpp::log()</a>, <a class="el" href="log__exp_8h-source.html#l00089">itpp::log_double_max</a>, and <a class="el" href="log__exp_8h-source.html#l00091">itpp::log_double_min</a>.</p> |
---|
281 | |
---|
282 | <p>Referenced by <a class="el" href="modulator_8h-source.html#l00408">itpp::Modulator< T >::demodulate_soft_bits()</a>, <a class="el" href="modulator_8cpp-source.html#l00430">itpp::PAM_c::demodulate_soft_bits()</a>, and <a class="el" href="rec__syst__conv__code_8cpp-source.html#l00166">itpp::Rec_Syst_Conv_Code::map_decode()</a>.</p> |
---|
283 | |
---|
284 | </div> |
---|
285 | </div><p> |
---|
286 | </div> |
---|
287 | <hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10:02:14 2009 for mixpp by |
---|
288 | <a href="http://www.doxygen.org/index.html"> |
---|
289 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> |
---|
290 | </body> |
---|
291 | </html> |
---|