root/library/doc/html/bdmerror_8h.html @ 661

Revision 661, 17.1 kB (checked in by smidl, 15 years ago)

doc

Line 
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<!--
13function 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}
25function 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}
49window.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&nbsp;Page</span></a></li>
56      <li><a href="pages.html"><span>Related&nbsp;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&nbsp;List</span></a></li>
64      <li><a href="globals.html"><span>File&nbsp;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 &lt;sstream&gt;</code><br/>
73<code>#include &lt;string&gt;</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&nbsp;</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">&nbsp;</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&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="bdmerror_8h.html#a89a0f906b242b79c5d3d342291b2cab4">bdm_assert_debug</a>(t, s)&nbsp;&nbsp;&nbsp;bdm_assert(t, s)</td></tr>
82<tr><td class="mdescLeft">&nbsp;</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&nbsp;</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">&nbsp;</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&nbsp;</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">&nbsp;</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 &amp;ass, const std::string &amp;msg, const std::string &amp;file, int line)" -->
89void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacebdm.html#a390920d0fe065ba8f3b5dc294bc6b8ef">bdm::bdm_assert_f</a> (const std::string &amp;ass, const std::string &amp;msg, const std::string &amp;file, int line)</td></tr>
90<tr><td class="mdescLeft">&nbsp;</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 &amp;msg, const std::string &amp;file, int line)" -->
92void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacebdm.html#ac957bac1f6a211cd4880f6230e40fcf9">bdm::bdm_error_f</a> (const std::string &amp;msg, const std::string &amp;file, int line)</td></tr>
93<tr><td class="mdescLeft">&nbsp;</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 &amp;msg, const std::string &amp;file, int line)" -->
95void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacebdm.html#a3bce5d74b6efd46263ad2acc488ae961">bdm::bdm_warning_f</a> (const std::string &amp;msg, const std::string &amp;file, int line)</td></tr>
96<tr><td class="mdescLeft">&nbsp;</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&nbsp;</td>
117          <td class="paramname"></td>
118          <td>&nbsp;)&nbsp;</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 &lt;&lt; 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="emix_8cpp_source.html#l00056">bdm::emix::condition()</a>, <a class="el" href="kalman_8h_source.html#l00458">bdm::StateCanonical::connect_mlnorm()</a>, <a class="el" href="datasources_8h_source.html#l00128">bdm::EpdfDS::from_setting()</a>, <a class="el" href="discrete_8cpp_source.html#l00012">bdm::rectangular_support::initialize()</a>, <a class="el" href="bdmbase_8h_source.html#l01002">bdm::DS::log_add()</a>, <a class="el" href="loggers_8h_source.html#l00051">bdm::memlog::logit()</a>, <a class="el" href="emix_8cpp_source.html#l00045">bdm::emix::marginal()</a>, <a class="el" href="bdmbase_8h_source.html#l00184">bdm::RV::scalarname()</a>, <a class="el" href="bdmbase_8h_source.html#l00754">bdm::datalink_buffered::set_history()</a>, <a class="el" href="functions_8h_source.html#l00125">bdm::bilinfn::set_parameters()</a>, <a class="el" href="exp__family_8h_source.html#l01247">bdm::eEmp::set_parameters()</a>, <a class="el" href="emix_8cpp_source.html#l00005">bdm::emix::set_parameters()</a>, <a class="el" href="bdmbase_8h_source.html#l00036">bdm::str::str()</a>, <a class="el" href="particles_8h_source.html#l00182">bdm::PF::validate()</a>, <a class="el" href="merger_8h_source.html#l00283">bdm::merger_base::validate()</a>, <a class="el" href="kalman_8h_source.html#l00539">bdm::StateSpace&lt; sq_T &gt;::validate()</a>, <a class="el" href="kalman_8h_source.html#l00147">bdm::Kalman&lt; fsqmat &gt;::validate()</a>, <a class="el" href="exp__family_8h_source.html#l00811">bdm::mlstudent::validate()</a>, <a class="el" href="exp__family_8h_source.html#l00762">bdm::mgnorm&lt; sq_T &gt;::validate()</a>, <a class="el" href="exp__family_8h_source.html#l00701">bdm::mlnorm&lt; ldmat, enorm &gt;::validate()</a>, <a class="el" href="exp__family_8h_source.html#l00626">bdm::euni::validate()</a>, <a class="el" href="exp__family_8h_source.html#l00512">bdm::egamma::validate()</a>, <a class="el" href="exp__family_8h_source.html#l00398">bdm::mDirich::validate()</a>, <a class="el" href="exp__family_8h_source.html#l00146">bdm::enorm&lt; fsqmat &gt;::validate()</a>, <a class="el" href="ctrlbase_8cpp_source.html#l00023">bdm::LQG::validate()</a>, and <a class="el" href="arx_8h_source.html#l00177">bdm::ARX::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&nbsp;</td>
144          <td class="paramname"></td>
145          <td>&nbsp;)&nbsp;</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 &lt;&lt; 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#l00391">bdm::MultiModel::bayes()</a>, <a class="el" href="particles_8cpp_source.html#l00015">bdm::PF::bayes_weights()</a>, <a class="el" href="chmat_8h_source.html#l00087">bdm::chmat::chmat()</a>, <a class="el" href="square__mat_8h_source.html#l00092">bdm::sqmat::clear()</a>, <a class="el" href="bdmbase_8h_source.html#l01135">bdm::BM::condition()</a>, <a class="el" href="bdmbase_8h_source.html#l00576">bdm::mpdf_internal&lt; eigamma &gt;::condition()</a>, <a class="el" href="bdmbase_8h_source.html#l01111">bdm::BM::epredictor()</a>, <a class="el" href="exp__family_8cpp_source.html#l00090">bdm::egiw::est_theta()</a>, <a class="el" href="exp__family_8cpp_source.html#l00106">bdm::egiw::est_theta_cov()</a>, <a class="el" href="particles_8h_source.html#l00294">bdm::MPF::mpfepdf::evallog()</a>, <a class="el" href="exp__family_8h_source.html#l01278">bdm::eEmp::evallog()</a>, <a class="el" href="bdmbase_8h_source.html#l00369">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#l00498">bdm::mpdf::evallogcond()</a>, <a class="el" href="bdmbase_8h_source.html#l00513">bdm::mpdf::evallogcond_m()</a>, <a class="el" href="exp__family_8h_source.html#l00103">bdm::BMEF::flatten()</a>, <a class="el" href="datasources_8h_source.html#l00187">bdm::MpdfDS::from_setting()</a>, <a class="el" href="square__mat_8h_source.html#l00146">bdm::fsqmat::fsqmat()</a>, <a class="el" href="bdmbase_8h_source.html#l00977">bdm::DS::getdata()</a>, <a class="el" href="square__mat_8h_source.html#l00086">bdm::sqmat::invqform()</a>, <a class="el" href="square__mat_8h_source.html#l00067">bdm::sqmat::logdet()</a>, <a class="el" href="bdmbase_8h_source.html#l00879">bdm::logger::logit()</a>, <a class="el" href="bdmbase_8h_source.html#l01096">bdm::BM::logpred()</a>, <a class="el" href="bdmbase_8h_source.html#l00387">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="square__mat_8h_source.html#l00055">bdm::sqmat::mult_sym()</a>, <a class="el" href="square__mat_8h_source.html#l00060">bdm::sqmat::mult_sym_t()</a>, <a class="el" href="square__mat_8h_source.html#l00045">bdm::sqmat::opupdt()</a>, <a class="el" href="exp__family_8h_source.html#l00073">bdm::eEF::pow()</a>, <a class="el" href="bdmbase_8h_source.html#l01116">bdm::BM::predictor()</a>, <a class="el" href="square__mat_8h_source.html#l00080">bdm::sqmat::qform()</a>, <a class="el" href="ctrlbase_8h_source.html#l00023">bdm::Designer::redesign()</a>, <a class="el" href="exp__family_8cpp_source.html#l00265">bdm::eEmp::resample()</a>, <a class="el" href="particles_8h_source.html#l00143">bdm::PF::resmethod_from_set()</a>, <a class="el" href="particles_8h_source.html#l00289">bdm::MPF::mpfepdf::sample()</a>, <a class="el" href="exp__family_8h_source.html#l01272">bdm::eEmp::sample()</a>, <a class="el" href="bdmbase_8h_source.html#l00359">bdm::epdf::sample()</a>, <a class="el" href="bdmbase_8h_source.html#l00489">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="square__mat_8h_source.html#l00074">bdm::sqmat::sqrt_mult()</a>, <a class="el" href="loggers_8h_source.html#l00046">bdm::memlog::step()</a>, <a class="el" href="bdmbase_8h_source.html#l00996">bdm::DS::step()</a>, <a class="el" href="bdmbase_8h_source.html#l00888">bdm::logger::step()</a>, <a class="el" href="square__mat_8h_source.html#l00050">bdm::sqmat::to_mat()</a>, <a class="el" href="user__info_8cpp_source.html#l00029">bdm::UIFile::UIFile()</a>, <a class="el" href="bdmbase_8h_source.html#l00393">bdm::epdf::variance()</a>, <a class="el" href="datasources_8h_source.html#l00044">bdm::MemDS::write()</a>, and <a class="el" href="bdmbase_8h_source.html#l00986">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&nbsp;</td>
171          <td class="paramname"></td>
172          <td>&nbsp;)&nbsp;</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 &lt;&lt; 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#l00047">bdm::chmat::add()</a>, <a class="el" href="kalman_8cpp_source.html#l00185">bdm::EKFCh::bayes()</a>, <a class="el" href="kalman_8cpp_source.html#l00108">bdm::KalmanCh::bayes()</a>, <a class="el" href="bdmbase_8cpp_source.html#l00148">bdm::epdf::condition()</a>, <a class="el" href="bdmbase_8cpp_source.html#l00153">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#l00096">bdm::LQG::ricatti_step()</a>, and <a class="el" href="exp__family_8cpp_source.html#l00034">bdm::egiw::sample()</a>.</p>
187
188</div>
189</div>
190</div>
191<hr size="1"/><address style="text-align: right;"><small>Generated on Thu Oct 15 00:07:48 2009 for mixpp by&nbsp;
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>
Note: See TracBrowser for help on using the browser.