[472] | 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: mat_checks.h File Reference</title> |
---|
| 4 | <link href="tabs.css" rel="stylesheet" type="text/css"> |
---|
| 5 | <link href="doxygen.css" rel="stylesheet" type="text/css"> |
---|
| 6 | </head><body> |
---|
[538] | 7 | <!-- Generated by Doxygen 1.5.8 --> |
---|
[472] | 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="annotated.html"><span>Classes</span></a></li> |
---|
| 55 | <li class="current"><a href="files.html"><span>Files</span></a></li> |
---|
| 56 | </ul> |
---|
| 57 | </div> |
---|
| 58 | <div class="tabs"> |
---|
| 59 | <ul> |
---|
| 60 | <li><a href="files.html"><span>File List</span></a></li> |
---|
| 61 | <li><a href="globals.html"><span>File Members</span></a></li> |
---|
| 62 | </ul> |
---|
| 63 | </div> |
---|
| 64 | </div> |
---|
| 65 | <div class="contents"> |
---|
| 66 | <h1>mat_checks.h File Reference</h1>UnitTest++ checks specialized for IT++ matrices. |
---|
| 67 | <a href="#_details">More...</a> |
---|
| 68 | <p> |
---|
| 69 | <code>#include "../bdm/itpp_ext.h"</code><br> |
---|
| 70 | <code>#include "UnitTest++.h"</code><br> |
---|
[538] | 71 | <code>#include <string></code><br> |
---|
[472] | 72 | |
---|
| 73 | <p> |
---|
[538] | 74 | <a href="mat__checks_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0"> |
---|
[472] | 75 | <tr><td></td></tr> |
---|
| 76 | <tr><td colspan="2"><br><h2>Classes</h2></td></tr> |
---|
| 77 | <tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classCurrentContext.html">CurrentContext</a></td></tr> |
---|
| 78 | |
---|
| 79 | <tr><td colspan="2"><br><h2>Defines</h2></td></tr> |
---|
| 80 | <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><b>CHECK_EQUAL_EX</b>(expected, actual)</td></tr> |
---|
| 81 | |
---|
| 82 | <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><b>CHECK_CLOSE_EX</b>(expected, actual, tolerance)</td></tr> |
---|
| 83 | |
---|
| 84 | <tr><td colspan="2"><br><h2>Functions</h2></td></tr> |
---|
| 85 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d2f5ee790d69d988dccf7bc33895a91e"></a><!-- doxytag: member="mat_checks.h::AreClose" ref="d2f5ee790d69d988dccf7bc33895a91e" args="(const itpp::vec &expected, const itpp::vec &actual, double tolerance)" --> |
---|
| 86 | bool </td><td class="memItemRight" valign="bottom"><b>UnitTest::AreClose</b> (const itpp::vec &expected, const itpp::vec &actual, double tolerance)</td></tr> |
---|
| 87 | |
---|
| 88 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cc6cb1e0667420ee8a997d22b858fb16"></a><!-- doxytag: member="mat_checks.h::AreClose" ref="cc6cb1e0667420ee8a997d22b858fb16" args="(const itpp::vec &expected, const itpp::vec &actual, const itpp::vec &tolerance)" --> |
---|
| 89 | bool </td><td class="memItemRight" valign="bottom"><b>UnitTest::AreClose</b> (const itpp::vec &expected, const itpp::vec &actual, const itpp::vec &tolerance)</td></tr> |
---|
| 90 | |
---|
| 91 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="212b62d462510eef4ca6428e9424d30e"></a><!-- doxytag: member="mat_checks.h::AreClose" ref="212b62d462510eef4ca6428e9424d30e" args="(const itpp::mat &expected, const itpp::mat &actual, double tolerance)" --> |
---|
| 92 | bool </td><td class="memItemRight" valign="bottom"><b>UnitTest::AreClose</b> (const itpp::mat &expected, const itpp::mat &actual, double tolerance)</td></tr> |
---|
| 93 | |
---|
| 94 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f116756a3e75ef3687d7fa6d67a8996d"></a><!-- doxytag: member="mat_checks.h::CheckClose" ref="f116756a3e75ef3687d7fa6d67a8996d" args="(TestResults &results, const itpp::vec &expected, const itpp::vec &actual, double tolerance, TestDetails const &details)" --> |
---|
| 95 | void </td><td class="memItemRight" valign="bottom"><b>UnitTest::CheckClose</b> (TestResults &results, const itpp::vec &expected, const itpp::vec &actual, double tolerance, TestDetails const &details)</td></tr> |
---|
| 96 | |
---|
| 97 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c0eb9766897ac87c25885b9f2334d4f0"></a><!-- doxytag: member="mat_checks.h::CheckClose" ref="c0eb9766897ac87c25885b9f2334d4f0" args="(TestResults &results, const itpp::mat &expected, const itpp::mat &actual, double tolerance, TestDetails const &details)" --> |
---|
| 98 | void </td><td class="memItemRight" valign="bottom"><b>UnitTest::CheckClose</b> (TestResults &results, const itpp::mat &expected, const itpp::mat &actual, double tolerance, TestDetails const &details)</td></tr> |
---|
| 99 | |
---|
[538] | 100 | <tr><td class="memItemLeft" nowrap align="right" valign="top">itpp::vec </td><td class="memItemRight" valign="bottom"><a class="el" href="mat__checks_8h.html#07a4fc41bbcce7c2914a9cf270d8f485">make_close_tolerance</a> (const itpp::vec &variance, int nsamples)</td></tr> |
---|
| 101 | |
---|
[472] | 102 | </table> |
---|
[538] | 103 | <hr><a name="_details"></a><h2>Detailed Description</h2> |
---|
[472] | 104 | UnitTest++ checks specialized for IT++ matrices. |
---|
| 105 | <p> |
---|
| 106 | <dl class="author" compact><dt><b>Author:</b></dt><dd>Vaclav Barta.</dd></dl> |
---|
| 107 | ----------------------------------- BDM++ - C++ library for Bayesian Decision Making under Uncertainty<p> |
---|
| 108 | Using IT++ for numerical operations ----------------------------------- <hr><h2>Define Documentation</h2> |
---|
| 109 | <a class="anchor" name="291015c5990bebd682e3cfebb4e88662"></a><!-- doxytag: member="mat_checks.h::CHECK_CLOSE_EX" ref="291015c5990bebd682e3cfebb4e88662" args="(expected, actual, tolerance)" --> |
---|
| 110 | <div class="memitem"> |
---|
| 111 | <div class="memproto"> |
---|
| 112 | <table class="memname"> |
---|
| 113 | <tr> |
---|
| 114 | <td class="memname">#define CHECK_CLOSE_EX </td> |
---|
| 115 | <td>(</td> |
---|
| 116 | <td class="paramtype">expected, <tr> |
---|
| 117 | <td class="paramkey"></td> |
---|
| 118 | <td></td> |
---|
| 119 | <td class="paramtype">actual, <tr> |
---|
| 120 | <td class="paramkey"></td> |
---|
| 121 | <td></td> |
---|
| 122 | <td class="paramtype">tolerance </td> |
---|
| 123 | <td class="paramname"> </td> |
---|
| 124 | <td> ) </td> |
---|
| 125 | <td></td> |
---|
| 126 | </tr> |
---|
| 127 | </table> |
---|
| 128 | </div> |
---|
| 129 | <div class="memdoc"> |
---|
| 130 | |
---|
| 131 | <p> |
---|
| 132 | <b>Value:</b><div class="fragment"><pre class="fragment"><span class="keywordflow">do</span> \ |
---|
| 133 | { \ |
---|
| 134 | <span class="keywordflow">try</span> { \ |
---|
| 135 | CurrentContext::CheckCloseEx(*UnitTest::CurrentTest::Results(), expected, actual, tolerance, UnitTest::TestDetails(*UnitTest::CurrentTest::Details(), 0, <span class="keyword">false</span>)); \ |
---|
| 136 | } \ |
---|
| 137 | <span class="keywordflow">catch</span> (...) { \ |
---|
| 138 | UnitTest::CurrentTest::Results()->OnTestFailure(UnitTest::TestDetails(*UnitTest::CurrentTest::Details(), __LINE__), \ |
---|
| 139 | <span class="stringliteral">"Unhandled exception in CHECK_CLOSE_EX("</span> #expected <span class="stringliteral">", "</span> #actual <span class="stringliteral">")"</span>); \ |
---|
| 140 | } \ |
---|
| 141 | } <span class="keywordflow">while</span> (0) |
---|
| 142 | </pre></div> |
---|
| 143 | </div> |
---|
| 144 | </div><p> |
---|
| 145 | <a class="anchor" name="8e84a3d33a16b28dbace57595b1c8ec2"></a><!-- doxytag: member="mat_checks.h::CHECK_EQUAL_EX" ref="8e84a3d33a16b28dbace57595b1c8ec2" args="(expected, actual)" --> |
---|
| 146 | <div class="memitem"> |
---|
| 147 | <div class="memproto"> |
---|
| 148 | <table class="memname"> |
---|
| 149 | <tr> |
---|
| 150 | <td class="memname">#define CHECK_EQUAL_EX </td> |
---|
| 151 | <td>(</td> |
---|
| 152 | <td class="paramtype">expected, <tr> |
---|
| 153 | <td class="paramkey"></td> |
---|
| 154 | <td></td> |
---|
| 155 | <td class="paramtype">actual </td> |
---|
| 156 | <td class="paramname"> </td> |
---|
| 157 | <td> ) </td> |
---|
| 158 | <td></td> |
---|
| 159 | </tr> |
---|
| 160 | </table> |
---|
| 161 | </div> |
---|
| 162 | <div class="memdoc"> |
---|
| 163 | |
---|
| 164 | <p> |
---|
| 165 | <b>Value:</b><div class="fragment"><pre class="fragment"><span class="keywordflow">do</span> \ |
---|
| 166 | { \ |
---|
| 167 | <span class="keywordflow">try</span> { \ |
---|
| 168 | CurrentContext::CheckEqualEx(*UnitTest::CurrentTest::Results(), expected, actual, UnitTest::TestDetails(*UnitTest::CurrentTest::Details(), 0, <span class="keyword">false</span>)); \ |
---|
| 169 | } \ |
---|
| 170 | <span class="keywordflow">catch</span> (...) { \ |
---|
| 171 | UnitTest::CurrentTest::Results()->OnTestFailure(UnitTest::TestDetails(*UnitTest::CurrentTest::Details(), __LINE__), \ |
---|
| 172 | <span class="stringliteral">"Unhandled exception in CHECK_EQUAL_EX("</span> #expected <span class="stringliteral">", "</span> #actual <span class="stringliteral">")"</span>); \ |
---|
| 173 | } \ |
---|
| 174 | } <span class="keywordflow">while</span> (0) |
---|
| 175 | </pre></div> |
---|
| 176 | </div> |
---|
| 177 | </div><p> |
---|
[538] | 178 | <hr><h2>Function Documentation</h2> |
---|
| 179 | <a class="anchor" name="07a4fc41bbcce7c2914a9cf270d8f485"></a><!-- doxytag: member="mat_checks.h::make_close_tolerance" ref="07a4fc41bbcce7c2914a9cf270d8f485" args="(const itpp::vec &variance, int nsamples)" --> |
---|
| 180 | <div class="memitem"> |
---|
| 181 | <div class="memproto"> |
---|
| 182 | <table class="memname"> |
---|
| 183 | <tr> |
---|
| 184 | <td class="memname">itpp::vec make_close_tolerance </td> |
---|
| 185 | <td>(</td> |
---|
| 186 | <td class="paramtype">const itpp::vec & </td> |
---|
| 187 | <td class="paramname"> <em>variance</em>, </td> |
---|
| 188 | </tr> |
---|
| 189 | <tr> |
---|
| 190 | <td class="paramkey"></td> |
---|
| 191 | <td></td> |
---|
| 192 | <td class="paramtype">int </td> |
---|
| 193 | <td class="paramname"> <em>nsamples</em></td><td> </td> |
---|
| 194 | </tr> |
---|
| 195 | <tr> |
---|
| 196 | <td></td> |
---|
| 197 | <td>)</td> |
---|
| 198 | <td></td><td></td><td><code> [inline]</code></td> |
---|
| 199 | </tr> |
---|
| 200 | </table> |
---|
[472] | 201 | </div> |
---|
[538] | 202 | <div class="memdoc"> |
---|
| 203 | |
---|
| 204 | <p> |
---|
| 205 | Constructs the multiple of standard deviation used for sample tests (currently 2). |
---|
| 206 | </div> |
---|
| 207 | </div><p> |
---|
| 208 | </div> |
---|
| 209 | <hr size="1"><address style="text-align: right;"><small>Generated on Sat Aug 15 17:40:58 2009 for mixpp by |
---|
[472] | 210 | <a href="http://www.doxygen.org/index.html"> |
---|
[538] | 211 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> |
---|
[472] | 212 | </body> |
---|
| 213 | </html> |
---|