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> |
---|
7 | <!-- Generated by Doxygen 1.5.9 --> |
---|
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> |
---|
71 | |
---|
72 | <p> |
---|
73 | <a href="mat__checks_8h_source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0"> |
---|
74 | <tr><td></td></tr> |
---|
75 | <tr><td colspan="2"><br><h2>Classes</h2></td></tr> |
---|
76 | <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> |
---|
77 | |
---|
78 | <tr><td colspan="2"><br><h2>Defines</h2></td></tr> |
---|
79 | <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> |
---|
80 | |
---|
81 | <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> |
---|
82 | |
---|
83 | <tr><td colspan="2"><br><h2>Functions</h2></td></tr> |
---|
84 | <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)" --> |
---|
85 | bool </td><td class="memItemRight" valign="bottom"><b>UnitTest::AreClose</b> (const itpp::vec &expected, const itpp::vec &actual, double tolerance)</td></tr> |
---|
86 | |
---|
87 | <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)" --> |
---|
88 | 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> |
---|
89 | |
---|
90 | <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)" --> |
---|
91 | bool </td><td class="memItemRight" valign="bottom"><b>UnitTest::AreClose</b> (const itpp::mat &expected, const itpp::mat &actual, double tolerance)</td></tr> |
---|
92 | |
---|
93 | <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)" --> |
---|
94 | 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> |
---|
95 | |
---|
96 | <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)" --> |
---|
97 | 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> |
---|
98 | |
---|
99 | </table> |
---|
100 | <hr><h2>Detailed Description</h2> |
---|
101 | UnitTest++ checks specialized for IT++ matrices. |
---|
102 | <p> |
---|
103 | <dl class="author" compact><dt><b>Author:</b></dt><dd>Vaclav Barta.</dd></dl> |
---|
104 | ----------------------------------- BDM++ - C++ library for Bayesian Decision Making under Uncertainty<p> |
---|
105 | Using IT++ for numerical operations ----------------------------------- <hr><h2>Define Documentation</h2> |
---|
106 | <a class="anchor" name="291015c5990bebd682e3cfebb4e88662"></a><!-- doxytag: member="mat_checks.h::CHECK_CLOSE_EX" ref="291015c5990bebd682e3cfebb4e88662" args="(expected, actual, tolerance)" --> |
---|
107 | <div class="memitem"> |
---|
108 | <div class="memproto"> |
---|
109 | <table class="memname"> |
---|
110 | <tr> |
---|
111 | <td class="memname">#define CHECK_CLOSE_EX </td> |
---|
112 | <td>(</td> |
---|
113 | <td class="paramtype">expected, <tr> |
---|
114 | <td class="paramkey"></td> |
---|
115 | <td></td> |
---|
116 | <td class="paramtype">actual, <tr> |
---|
117 | <td class="paramkey"></td> |
---|
118 | <td></td> |
---|
119 | <td class="paramtype">tolerance </td> |
---|
120 | <td class="paramname"> </td> |
---|
121 | <td> ) </td> |
---|
122 | <td></td> |
---|
123 | </tr> |
---|
124 | </table> |
---|
125 | </div> |
---|
126 | <div class="memdoc"> |
---|
127 | |
---|
128 | <p> |
---|
129 | <b>Value:</b><div class="fragment"><pre class="fragment"><span class="keywordflow">do</span> \ |
---|
130 | { \ |
---|
131 | <span class="keywordflow">try</span> { \ |
---|
132 | CurrentContext::CheckCloseEx(*UnitTest::CurrentTest::Results(), expected, actual, tolerance, UnitTest::TestDetails(*UnitTest::CurrentTest::Details(), 0, <span class="keyword">false</span>)); \ |
---|
133 | } \ |
---|
134 | <span class="keywordflow">catch</span> (...) { \ |
---|
135 | UnitTest::CurrentTest::Results()->OnTestFailure(UnitTest::TestDetails(*UnitTest::CurrentTest::Details(), __LINE__), \ |
---|
136 | <span class="stringliteral">"Unhandled exception in CHECK_CLOSE_EX("</span> #expected <span class="stringliteral">", "</span> #actual <span class="stringliteral">")"</span>); \ |
---|
137 | } \ |
---|
138 | } <span class="keywordflow">while</span> (0) |
---|
139 | </pre></div> |
---|
140 | </div> |
---|
141 | </div><p> |
---|
142 | <a class="anchor" name="8e84a3d33a16b28dbace57595b1c8ec2"></a><!-- doxytag: member="mat_checks.h::CHECK_EQUAL_EX" ref="8e84a3d33a16b28dbace57595b1c8ec2" args="(expected, actual)" --> |
---|
143 | <div class="memitem"> |
---|
144 | <div class="memproto"> |
---|
145 | <table class="memname"> |
---|
146 | <tr> |
---|
147 | <td class="memname">#define CHECK_EQUAL_EX </td> |
---|
148 | <td>(</td> |
---|
149 | <td class="paramtype">expected, <tr> |
---|
150 | <td class="paramkey"></td> |
---|
151 | <td></td> |
---|
152 | <td class="paramtype">actual </td> |
---|
153 | <td class="paramname"> </td> |
---|
154 | <td> ) </td> |
---|
155 | <td></td> |
---|
156 | </tr> |
---|
157 | </table> |
---|
158 | </div> |
---|
159 | <div class="memdoc"> |
---|
160 | |
---|
161 | <p> |
---|
162 | <b>Value:</b><div class="fragment"><pre class="fragment"><span class="keywordflow">do</span> \ |
---|
163 | { \ |
---|
164 | <span class="keywordflow">try</span> { \ |
---|
165 | CurrentContext::CheckEqualEx(*UnitTest::CurrentTest::Results(), expected, actual, UnitTest::TestDetails(*UnitTest::CurrentTest::Details(), 0, <span class="keyword">false</span>)); \ |
---|
166 | } \ |
---|
167 | <span class="keywordflow">catch</span> (...) { \ |
---|
168 | UnitTest::CurrentTest::Results()->OnTestFailure(UnitTest::TestDetails(*UnitTest::CurrentTest::Details(), __LINE__), \ |
---|
169 | <span class="stringliteral">"Unhandled exception in CHECK_EQUAL_EX("</span> #expected <span class="stringliteral">", "</span> #actual <span class="stringliteral">")"</span>); \ |
---|
170 | } \ |
---|
171 | } <span class="keywordflow">while</span> (0) |
---|
172 | </pre></div> |
---|
173 | </div> |
---|
174 | </div><p> |
---|
175 | </div> |
---|
176 | <hr size="1"><address style="text-align: right;"><small>Generated on Wed Aug 5 00:06:50 2009 for mixpp by |
---|
177 | <a href="http://www.doxygen.org/index.html"> |
---|
178 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address> |
---|
179 | </body> |
---|
180 | </html> |
---|