1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
---|
2 | <html xmlns="http://www.w3.org/1999/xhtml"> |
---|
3 | <head> |
---|
4 | <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
---|
5 | <title>mixpp: bdmerror.h File Reference</title> |
---|
6 | <link href="tabs.css" rel="stylesheet" type="text/css"/> |
---|
7 | <link href="doxygen.css" rel="stylesheet" type="text/css"/> |
---|
8 | </head> |
---|
9 | <body> |
---|
10 | <!-- Generated by Doxygen 1.6.1 --> |
---|
11 | <script type="text/javascript"> |
---|
12 | <!-- |
---|
13 | function changeDisplayState (e){ |
---|
14 | var num=this.id.replace(/[^[0-9]/g,''); |
---|
15 | var button=this.firstChild; |
---|
16 | var sectionDiv=document.getElementById('dynsection'+num); |
---|
17 | if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){ |
---|
18 | sectionDiv.style.display='block'; |
---|
19 | button.src='open.gif'; |
---|
20 | }else{ |
---|
21 | sectionDiv.style.display='none'; |
---|
22 | button.src='closed.gif'; |
---|
23 | } |
---|
24 | } |
---|
25 | function initDynSections(){ |
---|
26 | var divs=document.getElementsByTagName('div'); |
---|
27 | var sectionCounter=1; |
---|
28 | for(var i=0;i<divs.length-1;i++){ |
---|
29 | if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){ |
---|
30 | var header=divs[i]; |
---|
31 | var section=divs[i+1]; |
---|
32 | var button=header.firstChild; |
---|
33 | if (button!='IMG'){ |
---|
34 | divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild); |
---|
35 | button=document.createElement('img'); |
---|
36 | divs[i].insertBefore(button,divs[i].firstChild); |
---|
37 | } |
---|
38 | header.style.cursor='pointer'; |
---|
39 | header.onclick=changeDisplayState; |
---|
40 | header.id='dynheader'+sectionCounter; |
---|
41 | button.src='closed.gif'; |
---|
42 | section.id='dynsection'+sectionCounter; |
---|
43 | section.style.display='none'; |
---|
44 | section.style.marginLeft='14px'; |
---|
45 | sectionCounter++; |
---|
46 | } |
---|
47 | } |
---|
48 | } |
---|
49 | window.onload = initDynSections; |
---|
50 | --> |
---|
51 | </script> |
---|
52 | <div class="navigation" id="top"> |
---|
53 | <div class="tabs"> |
---|
54 | <ul> |
---|
55 | <li><a href="main.html"><span>Main Page</span></a></li> |
---|
56 | <li><a href="pages.html"><span>Related Pages</span></a></li> |
---|
57 | <li><a href="annotated.html"><span>Classes</span></a></li> |
---|
58 | <li class="current"><a href="files.html"><span>Files</span></a></li> |
---|
59 | </ul> |
---|
60 | </div> |
---|
61 | <div class="tabs"> |
---|
62 | <ul> |
---|
63 | <li><a href="files.html"><span>File List</span></a></li> |
---|
64 | <li><a href="globals.html"><span>File Members</span></a></li> |
---|
65 | </ul> |
---|
66 | </div> |
---|
67 | </div> |
---|
68 | <div class="contents"> |
---|
69 | <h1>bdmerror.h File Reference</h1> |
---|
70 | <p>BDM's exception-throwing macros. |
---|
71 | <a href="#_details">More...</a></p> |
---|
72 | <code>#include <sstream></code><br/> |
---|
73 | <code>#include <string></code><br/> |
---|
74 | |
---|
75 | <p><a href="bdmerror_8h_source.html">Go to the source code of this file.</a></p> |
---|
76 | <table border="0" cellpadding="0" cellspacing="0"> |
---|
77 | <tr><td colspan="2"><h2>Defines</h2></td></tr> |
---|
78 | <tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="bdmerror_8h.html#a7a3399d182b8e3065532596e76f84849">bdm_assert</a>(t, s)</td></tr> |
---|
79 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Throw std::runtime_exception if <code>t</code> is not true. <a href="#a7a3399d182b8e3065532596e76f84849"></a><br/></td></tr> |
---|
80 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a89a0f906b242b79c5d3d342291b2cab4"></a><!-- doxytag: member="bdmerror.h::bdm_assert_debug" ref="a89a0f906b242b79c5d3d342291b2cab4" args="(t, s)" --> |
---|
81 | #define </td><td class="memItemRight" valign="bottom"><a class="el" href="bdmerror_8h.html#a89a0f906b242b79c5d3d342291b2cab4">bdm_assert_debug</a>(t, s) bdm_assert(t, s)</td></tr> |
---|
82 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Throw std::runtime_exception if <code>t</code> is not true and NDEBUG is not defined. <br/></td></tr> |
---|
83 | <tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="bdmerror_8h.html#a7c43f3a72afe68ab0c85663a1bb3521a">bdm_error</a>(s)</td></tr> |
---|
84 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Unconditionally throw std::runtime_error. <a href="#a7c43f3a72afe68ab0c85663a1bb3521a"></a><br/></td></tr> |
---|
85 | <tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="bdmerror_8h.html#a59c5a63b3878ebcd6cc952fc2b47191c">bdm_warning</a>(s)</td></tr> |
---|
86 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Display a warning message. <a href="#a59c5a63b3878ebcd6cc952fc2b47191c"></a><br/></td></tr> |
---|
87 | <tr><td colspan="2"><h2>Functions</h2></td></tr> |
---|
88 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a390920d0fe065ba8f3b5dc294bc6b8ef"></a><!-- doxytag: member="bdmerror.h::bdm_assert_f" ref="a390920d0fe065ba8f3b5dc294bc6b8ef" args="(const std::string &ass, const std::string &msg, const std::string &file, int line)" --> |
---|
89 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacebdm.html#a390920d0fe065ba8f3b5dc294bc6b8ef">bdm::bdm_assert_f</a> (const std::string &ass, const std::string &msg, const std::string &file, int line)</td></tr> |
---|
90 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Helper function for the <code>bdm_assert</code> and <code>bdm_assert_debug</code> macros. <br/></td></tr> |
---|
91 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac957bac1f6a211cd4880f6230e40fcf9"></a><!-- doxytag: member="bdmerror.h::bdm_error_f" ref="ac957bac1f6a211cd4880f6230e40fcf9" args="(const std::string &msg, const std::string &file, int line)" --> |
---|
92 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacebdm.html#ac957bac1f6a211cd4880f6230e40fcf9">bdm::bdm_error_f</a> (const std::string &msg, const std::string &file, int line)</td></tr> |
---|
93 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Helper function for the <code>bdm_error</code> macro. <br/></td></tr> |
---|
94 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3bce5d74b6efd46263ad2acc488ae961"></a><!-- doxytag: member="bdmerror.h::bdm_warning_f" ref="a3bce5d74b6efd46263ad2acc488ae961" args="(const std::string &msg, const std::string &file, int line)" --> |
---|
95 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacebdm.html#a3bce5d74b6efd46263ad2acc488ae961">bdm::bdm_warning_f</a> (const std::string &msg, const std::string &file, int line)</td></tr> |
---|
96 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Helper function for the <code>bdm_warning</code> macro. <br/></td></tr> |
---|
97 | </table> |
---|
98 | <hr/><a name="_details"></a><h2>Detailed Description</h2> |
---|
99 | <p>BDM's exception-throwing macros. </p> |
---|
100 | <dl class="author"><dt><b>Author:</b></dt><dd>Vaclav Barta.</dd></dl> |
---|
101 | <p>----------------------------------- BDM++ - C++ library for Bayesian Decision Making under Uncertainty</p> |
---|
102 | <p>Using IT++ for numerical operations ----------------------------------- </p> |
---|
103 | <hr/><h2>Define Documentation</h2> |
---|
104 | <a class="anchor" id="a7a3399d182b8e3065532596e76f84849"></a><!-- doxytag: member="bdmerror.h::bdm_assert" ref="a7a3399d182b8e3065532596e76f84849" args="(t, s)" --> |
---|
105 | <div class="memitem"> |
---|
106 | <div class="memproto"> |
---|
107 | <table class="memname"> |
---|
108 | <tr> |
---|
109 | <td class="memname">#define bdm_assert</td> |
---|
110 | <td>(</td> |
---|
111 | <td class="paramtype">t, </td> |
---|
112 | </tr> |
---|
113 | <tr> |
---|
114 | <td class="paramkey"></td> |
---|
115 | <td></td> |
---|
116 | <td class="paramtype">s </td> |
---|
117 | <td class="paramname"></td> |
---|
118 | <td> ) </td> |
---|
119 | <td></td> |
---|
120 | </tr> |
---|
121 | </table> |
---|
122 | </div> |
---|
123 | <div class="memdoc"> |
---|
124 | <b>Value:</b><div class="fragment"><pre class="fragment"><span class="keywordflow">if</span> (!(t)) { \ |
---|
125 | std::ostringstream bdm_out; \ |
---|
126 | bdm_out << s; \ |
---|
127 | bdm::bdm_assert_f(#t, bdm_out.str(), __FILE__, __LINE__); \ |
---|
128 | } <span class="keywordflow">else</span> ((<span class="keywordtype">void</span>) 0) |
---|
129 | </pre></div> |
---|
130 | <p>Throw std::runtime_exception if <code>t</code> is not true. </p> |
---|
131 | |
---|
132 | <p>Referenced by <a class="el" href="merger_8h_source.html#l00283">bdm::merger_base::validate()</a>.</p> |
---|
133 | |
---|
134 | </div> |
---|
135 | </div> |
---|
136 | <a class="anchor" id="a7c43f3a72afe68ab0c85663a1bb3521a"></a><!-- doxytag: member="bdmerror.h::bdm_error" ref="a7c43f3a72afe68ab0c85663a1bb3521a" args="(s)" --> |
---|
137 | <div class="memitem"> |
---|
138 | <div class="memproto"> |
---|
139 | <table class="memname"> |
---|
140 | <tr> |
---|
141 | <td class="memname">#define bdm_error</td> |
---|
142 | <td>(</td> |
---|
143 | <td class="paramtype">s </td> |
---|
144 | <td class="paramname"></td> |
---|
145 | <td> ) </td> |
---|
146 | <td></td> |
---|
147 | </tr> |
---|
148 | </table> |
---|
149 | </div> |
---|
150 | <div class="memdoc"> |
---|
151 | <b>Value:</b><div class="fragment"><pre class="fragment"><span class="keywordflow">if</span> (<span class="keyword">true</span>) { \ |
---|
152 | std::ostringstream bdm_out; \ |
---|
153 | bdm_out << s; \ |
---|
154 | bdm::bdm_error_f(bdm_out.str(), __FILE__, __LINE__); \ |
---|
155 | } <span class="keywordflow">else</span> ((<span class="keywordtype">void</span>) 0) |
---|
156 | </pre></div> |
---|
157 | <p>Unconditionally throw std::runtime_error. </p> |
---|
158 | |
---|
159 | <p>Referenced by <a class="el" href="exp__family_8h_source.html#l00107">bdm::BMEF::_copy_()</a>, <a class="el" href="ctrlbase_8h_source.html#l00028">bdm::Designer::apply()</a>, <a class="el" href="kalman_8h_source.html#l00313">bdm::MultiModel::bayes()</a>, <a class="el" href="chmat_8h_source.html#l00085">bdm::chmat::chmat()</a>, <a class="el" href="bdmbase_8h_source.html#l01104">bdm::BM::condition()</a>, <a class="el" href="bdmbase_8h_source.html#l00565">bdm::mpdf_internal< enorm< chmat > >::condition()</a>, <a class="el" href="bdmbase_8h_source.html#l01080">bdm::BM::epredictor()</a>, <a class="el" href="exp__family_8cpp_source.html#l00073">bdm::egiw::est_theta()</a>, <a class="el" href="exp__family_8cpp_source.html#l00089">bdm::egiw::est_theta_cov()</a>, <a class="el" href="exp__family_8h_source.html#l01174">bdm::eEmp::evallog()</a>, <a class="el" href="bdmbase_8h_source.html#l00358">bdm::epdf::evallog()</a>, <a class="el" href="exp__family_8h_source.html#l00048">bdm::eEF::evallog_nn()</a>, <a class="el" href="bdmbase_8h_source.html#l00487">bdm::mpdf::evallogcond()</a>, <a class="el" href="bdmbase_8h_source.html#l00502">bdm::mpdf::evallogcond_m()</a>, <a class="el" href="exp__family_8h_source.html#l00103">bdm::BMEF::flatten()</a>, <a class="el" href="square__mat_8h_source.html#l00146">bdm::fsqmat::fsqmat()</a>, <a class="el" href="bdmbase_8h_source.html#l00948">bdm::DS::getdata()</a>, <a class="el" href="bdmbase_8h_source.html#l00852">bdm::logger::logit()</a>, <a class="el" href="bdmbase_8h_source.html#l01065">bdm::BM::logpred()</a>, <a class="el" href="bdmbase_8h_source.html#l00376">bdm::epdf::mean()</a>, <a class="el" href="merger_8h_source.html#l00182">bdm::merger_base::merge()</a>, <a class="el" href="emix_8h_source.html#l00054">bdm::mratio::mratio()</a>, <a class="el" href="exp__family_8h_source.html#l00073">bdm::eEF::pow()</a>, <a class="el" href="bdmbase_8h_source.html#l01085">bdm::BM::predictor()</a>, <a class="el" href="ctrlbase_8h_source.html#l00023">bdm::Designer::redesign()</a>, <a class="el" href="exp__family_8cpp_source.html#l00222">bdm::eEmp::resample()</a>, <a class="el" href="exp__family_8h_source.html#l01168">bdm::eEmp::sample()</a>, <a class="el" href="exp__family_8h_source.html#l00289">bdm::eDirich::sample()</a>, <a class="el" href="bdmbase_8h_source.html#l00348">bdm::epdf::sample()</a>, <a class="el" href="bdmbase_8h_source.html#l00478">bdm::mpdf::samplecond()</a>, <a class="el" href="user__info_8cpp_source.html#l00047">bdm::UIFile::save()</a>, <a class="el" href="emix_8cpp_source.html#l00062">bdm::egiwmix::set_parameters()</a>, <a class="el" href="exp__family_8h_source.html#l00093">bdm::BMEF::set_statistics()</a>, <a class="el" href="loggers_8h_source.html#l00045">bdm::memlog::step()</a>, <a class="el" href="bdmbase_8h_source.html#l00861">bdm::logger::step()</a>, <a class="el" href="user__info_8cpp_source.html#l00029">bdm::UIFile::UIFile()</a>, <a class="el" href="exp__family_8cpp_source.html#l00126">bdm::egiw::variance()</a>, <a class="el" href="bdmbase_8h_source.html#l00382">bdm::epdf::variance()</a>, <a class="el" href="datasources_8h_source.html#l00045">bdm::MemDS::write()</a>, and <a class="el" href="bdmbase_8h_source.html#l00958">bdm::DS::write()</a>.</p> |
---|
160 | |
---|
161 | </div> |
---|
162 | </div> |
---|
163 | <a class="anchor" id="a59c5a63b3878ebcd6cc952fc2b47191c"></a><!-- doxytag: member="bdmerror.h::bdm_warning" ref="a59c5a63b3878ebcd6cc952fc2b47191c" args="(s)" --> |
---|
164 | <div class="memitem"> |
---|
165 | <div class="memproto"> |
---|
166 | <table class="memname"> |
---|
167 | <tr> |
---|
168 | <td class="memname">#define bdm_warning</td> |
---|
169 | <td>(</td> |
---|
170 | <td class="paramtype">s </td> |
---|
171 | <td class="paramname"></td> |
---|
172 | <td> ) </td> |
---|
173 | <td></td> |
---|
174 | </tr> |
---|
175 | </table> |
---|
176 | </div> |
---|
177 | <div class="memdoc"> |
---|
178 | <b>Value:</b><div class="fragment"><pre class="fragment"><span class="keywordflow">if</span> (<span class="keyword">true</span>) { \ |
---|
179 | std::ostringstream bdm_out; \ |
---|
180 | bdm_out << s; \ |
---|
181 | bdm::bdm_warning_f(bdm_out.str(), __FILE__, __LINE__); \ |
---|
182 | } <span class="keywordflow">else</span> ((<span class="keywordtype">void</span>) 0) |
---|
183 | </pre></div> |
---|
184 | <p>Display a warning message. </p> |
---|
185 | |
---|
186 | <p>Referenced by <a class="el" href="chmat_8h_source.html#l00045">bdm::chmat::add()</a>, <a class="el" href="kalman_8cpp_source.html#l00182">bdm::EKFCh::bayes()</a>, <a class="el" href="kalman_8cpp_source.html#l00105">bdm::KalmanCh::bayes()</a>, <a class="el" href="bdmbase_8cpp_source.html#l00145">bdm::epdf::condition()</a>, <a class="el" href="bdmbase_8cpp_source.html#l00150">bdm::epdf::marginal()</a>, <a class="el" href="chmat_8cpp_source.html#l00025">bdm::chmat::mult_sym()</a>, <a class="el" href="chmat_8cpp_source.html#l00039">bdm::chmat::mult_sym_t()</a>, <a class="el" href="ctrlbase_8h_source.html#l00095">bdm::LQG::ricatti_step()</a>, and <a class="el" href="exp__family_8cpp_source.html#l00020">bdm::egiw::sample()</a>.</p> |
---|
187 | |
---|
188 | </div> |
---|
189 | </div> |
---|
190 | </div> |
---|
191 | <hr size="1"/><address style="text-align: right;"><small>Generated on Tue Sep 8 22:11:32 2009 for mixpp by |
---|
192 | <a href="http://www.doxygen.org/index.html"> |
---|
193 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address> |
---|
194 | </body> |
---|
195 | </html> |
---|