root/doc/html/trig__hyp_8h-source.html @ 353

Revision 353, 17.9 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: trig_hyp.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>trig_hyp.h</h1><a href="trig__hyp_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 TRIG_HYP_H</span>
67<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#define TRIG_HYP_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="itcompat_8h.html" title="IT++ compatibility types and functions.">itpp/base/itcompat.h</a>&gt;</span>
70<a name="l00033"></a>00033 <span class="preprocessor">#include &lt;<a class="code" href="help__functions_8h.html" title="Help functions to make functions with vec and mat as arguments.">itpp/base/help_functions.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="l00041"></a>00041
77<a name="l00043"></a><a class="code" href="group__trifunc.html#gd9857e46543aee738e3de1a280aafce9">00043</a> <span class="keyword">inline</span> <span class="keywordtype">double</span> <a class="code" href="group__trifunc.html#ga55ffe19493ed1ddcae764163fc33e34" title="Sinc function, sin(pi*x)/(pi*x).">sinc</a>(<span class="keywordtype">double</span> x)
78<a name="l00044"></a>00044 {
79<a name="l00045"></a>00045   <span class="keywordflow">if</span> (x == 0) {
80<a name="l00046"></a>00046     <span class="keywordflow">return</span> 1.0;
81<a name="l00047"></a>00047   }
82<a name="l00048"></a>00048   <span class="keywordflow">else</span> {
83<a name="l00049"></a>00049     <span class="keywordtype">double</span> pix = itpp::pi * x;
84<a name="l00050"></a>00050     <span class="keywordflow">return</span> <a class="code" href="group__trifunc.html#g680fb273328ac7897cf28f6f980fe458" title="Sine function.">sin</a>(pix) / pix;
85<a name="l00051"></a>00051   }
86<a name="l00052"></a>00052 }
87<a name="l00053"></a>00053
88<a name="l00055"></a><a class="code" href="group__trifunc.html#g04eb00778bdb524ad2f5ed808caddb7e">00055</a> <span class="keyword">inline</span> vec <a class="code" href="group__trifunc.html#g680fb273328ac7897cf28f6f980fe458" title="Sine function.">sin</a>(<span class="keyword">const</span> vec &amp;x) { <span class="keywordflow">return</span> apply_function&lt;double&gt;(<a class="code" href="group__trifunc.html#g680fb273328ac7897cf28f6f980fe458" title="Sine function.">std::sin</a>, x); }
89<a name="l00057"></a><a class="code" href="group__trifunc.html#g680fb273328ac7897cf28f6f980fe458">00057</a> <span class="keyword">inline</span> mat <a class="code" href="group__trifunc.html#g680fb273328ac7897cf28f6f980fe458" title="Sine function.">sin</a>(<span class="keyword">const</span> mat &amp;x) { <span class="keywordflow">return</span> apply_function&lt;double&gt;(<a class="code" href="group__trifunc.html#g680fb273328ac7897cf28f6f980fe458" title="Sine function.">std::sin</a>, x); }
90<a name="l00059"></a><a class="code" href="group__trifunc.html#g4a0a6b79f68136b2cd509978c973b11c">00059</a> <span class="keyword">inline</span> vec <a class="code" href="group__trifunc.html#g098a0025955a83d70458225324c21acf" title="Cosine function.">cos</a>(<span class="keyword">const</span> vec &amp;x) { <span class="keywordflow">return</span> apply_function&lt;double&gt;(<a class="code" href="group__trifunc.html#g098a0025955a83d70458225324c21acf" title="Cosine function.">std::cos</a>, x); }
91<a name="l00061"></a><a class="code" href="group__trifunc.html#g098a0025955a83d70458225324c21acf">00061</a> <span class="keyword">inline</span> mat <a class="code" href="group__trifunc.html#g098a0025955a83d70458225324c21acf" title="Cosine function.">cos</a>(<span class="keyword">const</span> mat &amp;x) { <span class="keywordflow">return</span> apply_function&lt;double&gt;(<a class="code" href="group__trifunc.html#g098a0025955a83d70458225324c21acf" title="Cosine function.">std::cos</a>, x); }
92<a name="l00063"></a><a class="code" href="group__trifunc.html#g5c122ee62a49234c740b8f02cadf8a31">00063</a> <span class="keyword">inline</span> vec <a class="code" href="group__trifunc.html#g5e04687667f43b2a4dac6c9c96cf4ea1" title="Tan function.">tan</a>(<span class="keyword">const</span> vec &amp;x) { <span class="keywordflow">return</span> apply_function&lt;double&gt;(<a class="code" href="group__trifunc.html#g5e04687667f43b2a4dac6c9c96cf4ea1" title="Tan function.">std::tan</a>, x); }
93<a name="l00065"></a><a class="code" href="group__trifunc.html#g5e04687667f43b2a4dac6c9c96cf4ea1">00065</a> <span class="keyword">inline</span> mat <a class="code" href="group__trifunc.html#g5e04687667f43b2a4dac6c9c96cf4ea1" title="Tan function.">tan</a>(<span class="keyword">const</span> mat &amp;x) { <span class="keywordflow">return</span> apply_function&lt;double&gt;(<a class="code" href="group__trifunc.html#g5e04687667f43b2a4dac6c9c96cf4ea1" title="Tan function.">std::tan</a>, x); }
94<a name="l00067"></a><a class="code" href="group__trifunc.html#g6340441d4c1e87c5678df07e2d0b4900">00067</a> <span class="keyword">inline</span> vec <a class="code" href="group__trifunc.html#g835724392e8ab9d061a01994abcbd58a" title="Inverse sine function.">asin</a>(<span class="keyword">const</span> vec &amp;x) { <span class="keywordflow">return</span> apply_function&lt;double&gt;(<a class="code" href="group__trifunc.html#g835724392e8ab9d061a01994abcbd58a" title="Inverse sine function.">std::asin</a>, x); }
95<a name="l00069"></a><a class="code" href="group__trifunc.html#g835724392e8ab9d061a01994abcbd58a">00069</a> <span class="keyword">inline</span> mat <a class="code" href="group__trifunc.html#g835724392e8ab9d061a01994abcbd58a" title="Inverse sine function.">asin</a>(<span class="keyword">const</span> mat &amp;x) { <span class="keywordflow">return</span> apply_function&lt;double&gt;(<a class="code" href="group__trifunc.html#g835724392e8ab9d061a01994abcbd58a" title="Inverse sine function.">std::asin</a>, x); }
96<a name="l00071"></a><a class="code" href="group__trifunc.html#ge4f322dd7c1fc423d52d89f63bd5003a">00071</a> <span class="keyword">inline</span> vec <a class="code" href="group__trifunc.html#g947ddd5d7416e31e807da5c9b3710b83" title="Inverse cosine function.">acos</a>(<span class="keyword">const</span> vec &amp;x) { <span class="keywordflow">return</span> apply_function&lt;double&gt;(<a class="code" href="group__trifunc.html#g947ddd5d7416e31e807da5c9b3710b83" title="Inverse cosine function.">std::acos</a>, x); }
97<a name="l00073"></a><a class="code" href="group__trifunc.html#g947ddd5d7416e31e807da5c9b3710b83">00073</a> <span class="keyword">inline</span> mat <a class="code" href="group__trifunc.html#g947ddd5d7416e31e807da5c9b3710b83" title="Inverse cosine function.">acos</a>(<span class="keyword">const</span> mat &amp;x) { <span class="keywordflow">return</span> apply_function&lt;double&gt;(<a class="code" href="group__trifunc.html#g947ddd5d7416e31e807da5c9b3710b83" title="Inverse cosine function.">std::acos</a>, x); }
98<a name="l00075"></a><a class="code" href="group__trifunc.html#g6add1d5fc2e63ab9c0a40a9f56164ec1">00075</a> <span class="keyword">inline</span> vec <a class="code" href="group__trifunc.html#ge85f4963dc04e249aae040c7e246492e" title="Inverse tan function.">atan</a>(<span class="keyword">const</span> vec &amp;x) { <span class="keywordflow">return</span> apply_function&lt;double&gt;(<a class="code" href="group__trifunc.html#ge85f4963dc04e249aae040c7e246492e" title="Inverse tan function.">std::atan</a>, x); }
99<a name="l00077"></a><a class="code" href="group__trifunc.html#ge85f4963dc04e249aae040c7e246492e">00077</a> <span class="keyword">inline</span> mat <a class="code" href="group__trifunc.html#ge85f4963dc04e249aae040c7e246492e" title="Inverse tan function.">atan</a>(<span class="keyword">const</span> mat &amp;x) { <span class="keywordflow">return</span> apply_function&lt;double&gt;(<a class="code" href="group__trifunc.html#ge85f4963dc04e249aae040c7e246492e" title="Inverse tan function.">std::atan</a>, x); }
100<a name="l00079"></a><a class="code" href="group__trifunc.html#g0c6e34f743d1dcd3d58dbc2b2e7bd907">00079</a> <span class="keyword">inline</span> vec <a class="code" href="group__trifunc.html#ga55ffe19493ed1ddcae764163fc33e34" title="Sinc function, sin(pi*x)/(pi*x).">sinc</a>(<span class="keyword">const</span> vec &amp;x) { <span class="keywordflow">return</span> apply_function&lt;double&gt;(<a class="code" href="group__trifunc.html#ga55ffe19493ed1ddcae764163fc33e34" title="Sinc function, sin(pi*x)/(pi*x).">sinc</a>, x); }
101<a name="l00081"></a><a class="code" href="group__trifunc.html#ga55ffe19493ed1ddcae764163fc33e34">00081</a> <span class="keyword">inline</span> mat <a class="code" href="group__trifunc.html#ga55ffe19493ed1ddcae764163fc33e34" title="Sinc function, sin(pi*x)/(pi*x).">sinc</a>(<span class="keyword">const</span> mat &amp;x) { <span class="keywordflow">return</span> apply_function&lt;double&gt;(<a class="code" href="group__trifunc.html#ga55ffe19493ed1ddcae764163fc33e34" title="Sinc function, sin(pi*x)/(pi*x).">sinc</a>, x); }
102<a name="l00082"></a>00082
103<a name="l00084"></a>00084
104<a name="l00085"></a>00085
105<a name="l00088"></a>00088
106<a name="l00090"></a><a class="code" href="group__hypfunc.html#gd41e48e4e69612f172cbbd3cbe4abc35">00090</a> <span class="keyword">inline</span> vec <a class="code" href="group__hypfunc.html#gd9eda0c9cf67937deccd991a17bdd129" title="Sine hyperbolic function.">sinh</a>(<span class="keyword">const</span> vec &amp;x) { <span class="keywordflow">return</span> apply_function&lt;double&gt;(<a class="code" href="group__hypfunc.html#gd9eda0c9cf67937deccd991a17bdd129" title="Sine hyperbolic function.">std::sinh</a>, x); }
107<a name="l00092"></a><a class="code" href="group__hypfunc.html#gd9eda0c9cf67937deccd991a17bdd129">00092</a> <span class="keyword">inline</span> mat <a class="code" href="group__hypfunc.html#gd9eda0c9cf67937deccd991a17bdd129" title="Sine hyperbolic function.">sinh</a>(<span class="keyword">const</span> mat &amp;x) { <span class="keywordflow">return</span> apply_function&lt;double&gt;(<a class="code" href="group__hypfunc.html#gd9eda0c9cf67937deccd991a17bdd129" title="Sine hyperbolic function.">std::sinh</a>, x); }
108<a name="l00094"></a><a class="code" href="group__hypfunc.html#gd8c581c3fc2b05e390f90e411159409f">00094</a> <span class="keyword">inline</span> vec <a class="code" href="group__hypfunc.html#gdead5b215e4f47fedfb217d29855bb3a" title="Cosine hyperbolic function.">cosh</a>(<span class="keyword">const</span> vec &amp;x) { <span class="keywordflow">return</span> apply_function&lt;double&gt;(<a class="code" href="group__hypfunc.html#gdead5b215e4f47fedfb217d29855bb3a" title="Cosine hyperbolic function.">std::cosh</a>, x); }
109<a name="l00096"></a><a class="code" href="group__hypfunc.html#gdead5b215e4f47fedfb217d29855bb3a">00096</a> <span class="keyword">inline</span> mat <a class="code" href="group__hypfunc.html#gdead5b215e4f47fedfb217d29855bb3a" title="Cosine hyperbolic function.">cosh</a>(<span class="keyword">const</span> mat &amp;x) { <span class="keywordflow">return</span> apply_function&lt;double&gt;(<a class="code" href="group__hypfunc.html#gdead5b215e4f47fedfb217d29855bb3a" title="Cosine hyperbolic function.">std::cosh</a>, x); }
110<a name="l00098"></a><a class="code" href="group__hypfunc.html#gb9fc8caccd6028ea96a3190e9dc2dc8f">00098</a> <span class="keyword">inline</span> vec <a class="code" href="group__hypfunc.html#gae9721c4f050cc8ff591461fa4bfb9d4" title="Tan hyperbolic function.">tanh</a>(<span class="keyword">const</span> vec &amp;x) { <span class="keywordflow">return</span> apply_function&lt;double&gt;(<a class="code" href="group__hypfunc.html#gae9721c4f050cc8ff591461fa4bfb9d4" title="Tan hyperbolic function.">std::tanh</a>, x); }
111<a name="l00100"></a><a class="code" href="group__hypfunc.html#gae9721c4f050cc8ff591461fa4bfb9d4">00100</a> <span class="keyword">inline</span> mat <a class="code" href="group__hypfunc.html#gae9721c4f050cc8ff591461fa4bfb9d4" title="Tan hyperbolic function.">tanh</a>(<span class="keyword">const</span> mat &amp;x) { <span class="keywordflow">return</span> apply_function&lt;double&gt;(<a class="code" href="group__hypfunc.html#gae9721c4f050cc8ff591461fa4bfb9d4" title="Tan hyperbolic function.">std::tanh</a>, x); }
112<a name="l00102"></a><a class="code" href="group__hypfunc.html#gf8749ad5d41b3e913ae6462512960232">00102</a> <span class="keyword">inline</span> vec <a class="code" href="group__hypfunc.html#gcfa9ecafbe5e7500eb373a3b6710488b" title="Inverse sine hyperbolic function.">asinh</a>(<span class="keyword">const</span> vec &amp;x) { <span class="keywordflow">return</span> apply_function&lt;double&gt;(<a class="code" href="group__hypfunc.html#gcfa9ecafbe5e7500eb373a3b6710488b" title="Inverse sine hyperbolic function.">::asinh</a>, x); }
113<a name="l00104"></a><a class="code" href="group__hypfunc.html#gcfa9ecafbe5e7500eb373a3b6710488b">00104</a> <span class="keyword">inline</span> mat <a class="code" href="group__hypfunc.html#gcfa9ecafbe5e7500eb373a3b6710488b" title="Inverse sine hyperbolic function.">asinh</a>(<span class="keyword">const</span> mat &amp;x) { <span class="keywordflow">return</span> apply_function&lt;double&gt;(<a class="code" href="group__hypfunc.html#gcfa9ecafbe5e7500eb373a3b6710488b" title="Inverse sine hyperbolic function.">::asinh</a>, x); }
114<a name="l00106"></a><a class="code" href="group__hypfunc.html#g22af5b0cc2c399c128b0ed5cc6e25817">00106</a> <span class="keyword">inline</span> vec <a class="code" href="group__hypfunc.html#ge55ab3595aba1da34f68955c94c84ea8" title="Inverse cosine hyperbolic function.">acosh</a>(<span class="keyword">const</span> vec &amp;x) { <span class="keywordflow">return</span> apply_function&lt;double&gt;(<a class="code" href="group__hypfunc.html#ge55ab3595aba1da34f68955c94c84ea8" title="Inverse cosine hyperbolic function.">::acosh</a>, x); }
115<a name="l00108"></a><a class="code" href="group__hypfunc.html#ge55ab3595aba1da34f68955c94c84ea8">00108</a> <span class="keyword">inline</span> mat <a class="code" href="group__hypfunc.html#ge55ab3595aba1da34f68955c94c84ea8" title="Inverse cosine hyperbolic function.">acosh</a>(<span class="keyword">const</span> mat &amp;x) { <span class="keywordflow">return</span> apply_function&lt;double&gt;(<a class="code" href="group__hypfunc.html#ge55ab3595aba1da34f68955c94c84ea8" title="Inverse cosine hyperbolic function.">::acosh</a>, x); }
116<a name="l00110"></a><a class="code" href="group__hypfunc.html#g185ed13732562cf1c9985bd6c2df78fc">00110</a> <span class="keyword">inline</span> vec <a class="code" href="group__hypfunc.html#gdecec3cccf3661103eaf2410e8c66c8a" title="Inverse tan hyperbolic function.">atanh</a>(<span class="keyword">const</span> vec &amp;x) { <span class="keywordflow">return</span> apply_function&lt;double&gt;(<a class="code" href="group__hypfunc.html#gdecec3cccf3661103eaf2410e8c66c8a" title="Inverse tan hyperbolic function.">::atanh</a>, x); }
117<a name="l00112"></a><a class="code" href="group__hypfunc.html#gdecec3cccf3661103eaf2410e8c66c8a">00112</a> <span class="keyword">inline</span> mat <a class="code" href="group__hypfunc.html#gdecec3cccf3661103eaf2410e8c66c8a" title="Inverse tan hyperbolic function.">atanh</a>(<span class="keyword">const</span> mat &amp;x) { <span class="keywordflow">return</span> apply_function&lt;double&gt;(<a class="code" href="group__hypfunc.html#gdecec3cccf3661103eaf2410e8c66c8a" title="Inverse tan hyperbolic function.">::atanh</a>, x); }
118<a name="l00113"></a>00113
119<a name="l00115"></a>00115
120<a name="l00116"></a>00116 } <span class="comment">// namespace itpp</span>
121<a name="l00117"></a>00117
122<a name="l00118"></a>00118 <span class="preprocessor">#endif // #ifndef TRIG_HYP_H</span>
123</pre></div></div>
124<hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10:02:13 2009 for mixpp by&nbsp;
125<a href="http://www.doxygen.org/index.html">
126<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
127</body>
128</html>
Note: See TracBrowser for help on using the browser.