00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00027 #ifndef __IERET_INLINE_H__
00028 #define __IERET_INLINE_H__
00029
00030 inline void ie_return_type::set_termination_reason(const termination_reason& __t)
00031 {
00032 termr = __t;
00033 }
00034
00035 inline const termination_reason& ie_return_type::term_reason() const
00036 {
00037 return termr;
00038 }
00039
00040 inline ie_return_type ie_return_type::operator+(const std::pair<delta_base*,double>& __d)
00041 {
00042 ie_return_type __tmp(*this);
00043 __tmp.deltas.push_back(__d.first->new_copy());
00044 __tmp.weights.push_back(__d.second);
00045 return __tmp;
00046 }
00047
00048 inline ie_return_type& ie_return_type::operator+=(const std::pair<delta_base*,double>& __d)
00049 {
00050 deltas.push_back(__d.first->new_copy());
00051 weights.push_back(__d.second);
00052 return *this;
00053 }
00054
00055 #if 0
00056 inline ie_return_type ie_return_type::operator+(const std::pair<delta,double>& __d)
00057 {
00058 ie_return_type __tmp(*this);
00059 __tmp.deltas.push_back(__d.first);
00060 __tmp.weights.push_back(__d.second);
00061 return __tmp;
00062 }
00063
00064 inline ie_return_type& ie_return_type::operator+=(const std::pair<delta,double>& __d)
00065 {
00066 deltas.push_back(__d.first);
00067 weights.push_back(__d.second);
00068 return *this;
00069 }
00070 #endif
00071
00072 inline ie_return_type& ie_return_type::operator=(const ie_return_type& __d)
00073 {
00074 termr = __d.termr;
00075 deltas = __d.deltas;
00076 weights = __d.weights;
00077 _d = __d._d;
00078 info = __d.info;
00079 return *this;
00080 }
00081
00082 inline bool ie_return_type::set_information(const std::string& iname,
00083 const additional_info_u& a, bool force)
00084 {
00085 return info.sinsert(iname, a, force);
00086 }
00087
00088 inline bool ie_return_type::set_information_i(const std::string& iname, int i,
00089 const additional_info_u& a, bool force)
00090 {
00091 return info.sinsert(iname, i, a, force);
00092 }
00093
00094 inline const additional_info_u& ie_return_type::information(
00095 const std::string& iname) const
00096 {
00097 return info.sfind(iname);
00098 }
00099
00100 inline const additional_info_u& ie_return_type::information(const char* iname)
00101 const
00102 {
00103 return information(std::string(iname));
00104 }
00105
00106 inline const additional_info_u& ie_return_type::information(
00107 const std::string& iname, int i) const
00108 {
00109 return info.sfind(iname, i);
00110 }
00111
00112 inline const additional_info_u& ie_return_type::information(const char* iname,
00113 int i) const
00114 {
00115 return information(std::string(iname), i);
00116 }
00117
00118 inline bool ie_return_type::has_information(const std::string& __s) const
00119 {
00120 return info.defd(__s);
00121 }
00122
00123 inline bool ie_return_type::has_information(const char* __cp) const
00124 {
00125 return has_information(std::string(__cp));
00126 }
00127
00128 inline bool ie_return_type::has_information(const std::string& __s, int i) const
00129 {
00130 return info.defd(__s, i);
00131 }
00132
00133 inline bool ie_return_type::has_information(const char* __cp, int i) const
00134 {
00135 return has_information(std::string(__cp), i);
00136 }
00137
00138 inline bool ie_return_type::information_indices_set(const std::string& __s,
00139 std::vector<int>& __idx) const
00140 {
00141 return info.which(__s, __idx);
00142 }
00143
00144 inline bool ie_return_type::information_indices_set(const char* __cp,
00145 std::vector<int>& __idx) const
00146 {
00147 return information_indices_set(std::string(__cp), __idx);
00148 }
00149
00150 inline void ie_return_type::unset_information(const std::string& __s)
00151 {
00152 info.remove(__s);
00153 }
00154
00155 inline void ie_return_type::unset_information(const char* __cp)
00156 {
00157 unset_information(std::string(__cp));
00158 }
00159
00160 inline void ie_return_type::unset_information(const std::string& __s, int i)
00161 {
00162 info.remove(__s, i);
00163 }
00164
00165 inline void ie_return_type::unset_information(const char* __cp, int i)
00166 {
00167 unset_information(std::string(__cp), i);
00168 }
00169
00170 template <class _S>
00171 inline bool ie_return_type::retrieve_from_info(const std::string& __s,
00172 const std::vector<_S>*& __b) const
00173 {
00174 return info.retrieve(__s, __b);
00175 }
00176
00177 template <class _S>
00178 inline bool ie_return_type::retrieve_from_info(const std::string& __s,
00179 const matrix<_S>*& __b) const
00180 {
00181 return info.retrieve(__s, __b);
00182 }
00183
00184 template <class _S>
00185 inline bool ie_return_type::retrieve_from_info(const std::string& __s, _S& __b)
00186 const
00187 {
00188 return info.retrieve(__s, __b);
00189 }
00190
00191 template <class _S>
00192 inline bool ie_return_type::retrieve_from_info(const std::string& __s,
00193 const std::vector<_S>*& __b, const std::vector<_S>* __def) const
00194 {
00195 return info.retrieve(__s, __b, __def);
00196 }
00197
00198 template <class _S>
00199 inline bool ie_return_type::retrieve_from_info(const std::string& __s,
00200 const matrix<_S>*& __b, const matrix<_S>* __def) const
00201 {
00202 return info.retrieve(__s, __b, __def);
00203 }
00204
00205 template <class _S>
00206 inline bool ie_return_type::retrieve_from_info(const std::string& __s, _S& __b,
00207 const _S& __def) const
00208 {
00209 return info.retrieve(__s, __b, __def);
00210 }
00211
00212 template <class _S>
00213 inline bool ie_return_type::retrieve_from_info(const char* __s,
00214 const std::vector<_S>*& __b) const
00215 {
00216 return retrieve_from_info(std::string(__s), __b);
00217 }
00218
00219 template <class _S>
00220 inline bool ie_return_type::retrieve_from_info(const char* __s,
00221 const matrix<_S>*& __b) const
00222 {
00223 return retrieve_from_info(std::string(__s), __b);
00224 }
00225
00226 template <class _S>
00227 inline bool ie_return_type::retrieve_from_info(const char* __s, _S& __b) const
00228 {
00229 return retrieve_from_info(std::string(__s), __b);
00230 }
00231
00232 template <class _S>
00233 inline bool ie_return_type::retrieve_from_info(const char* __s,
00234 const std::vector<_S>*& __b, const std::vector<_S>* __def) const
00235 {
00236 return retrieve_from_info(std::string(__s), __b, __def);
00237 }
00238
00239 template <class _S>
00240 inline bool ie_return_type::retrieve_from_info(const char* __s,
00241 const matrix<_S>*& __b, const matrix<_S>* __def) const
00242 {
00243 return retrieve_from_info(std::string(__s), __b, __def);
00244 }
00245
00246 template <class _S>
00247 inline bool ie_return_type::retrieve_from_info(const char* __s, _S& __b,
00248 const _S& __def) const
00249 {
00250 return retrieve_from_info(std::string(__s), __b, __def);
00251 }
00252
00253 template <class _S>
00254 inline bool ie_return_type::retrieve_from_info_i(const std::string& __s, int i,
00255 const std::vector<_S>*& __b) const
00256 {
00257 return info.retrieve_i(__s, i, __b);
00258 }
00259
00260 template <class _S>
00261 inline bool ie_return_type::retrieve_from_info_i(const std::string& __s, int i,
00262 const matrix<_S>*& __b) const
00263 {
00264 return info.retrieve_i(__s, i, __b);
00265 }
00266
00267 template <class _S>
00268 inline bool ie_return_type::retrieve_from_info_i(const std::string& __s, int i,
00269 _S& __b) const
00270 {
00271 return info.retrieve_i(__s, i, __b);
00272 }
00273
00274 template <class _S>
00275 inline bool ie_return_type::retrieve_from_info_i(const std::string& __s, int i,
00276 const std::vector<_S>*& __b, const std::vector<_S>* __def) const
00277 {
00278 return info.retrieve(__s, i, __b, __def);
00279 }
00280
00281 template <class _S>
00282 inline bool ie_return_type::retrieve_from_info_i(const std::string& __s, int i,
00283 const matrix<_S>*& __b, const matrix<_S>* __def) const
00284 {
00285 return info.retrieve(__s, i, __b, __def);
00286 }
00287
00288 template <class _S>
00289 inline bool ie_return_type::retrieve_from_info_i(const std::string& __s, int i,
00290 _S& __b, const _S& __def) const
00291 {
00292 return info.retrieve(__s, i, __b, __def);
00293 }
00294
00295 template <class _S>
00296 inline bool ie_return_type::retrieve_from_info_i(const char* __s, int i,
00297 const std::vector<_S>*& __b) const
00298 {
00299 return retrieve_from_info(std::string(__s), i, __b);
00300 }
00301
00302 template <class _S>
00303 inline bool ie_return_type::retrieve_from_info_i(const char* __s, int i,
00304 const matrix<_S>*& __b) const
00305 {
00306 return retrieve_from_info(std::string(__s), i, __b);
00307 }
00308
00309 template <class _S>
00310 inline bool ie_return_type::retrieve_from_info_i(const char* __s, int i,
00311 _S& __b) const
00312 {
00313 return retrieve_from_info(std::string(__s), i, __b);
00314 }
00315
00316 template <class _S>
00317 inline bool ie_return_type::retrieve_from_info_i(const char* __s, int i,
00318 const std::vector<_S>*& __b, const std::vector<_S>* __def) const
00319 {
00320 return retrieve_from_info(std::string(__s), i, __b, __def);
00321 }
00322
00323 template <class _S>
00324 inline bool ie_return_type::retrieve_from_info_i(const char* __s, int i,
00325 const matrix<_S>*& __b, const matrix<_S>* __def) const
00326 {
00327 return retrieve_from_info(std::string(__s), i, __b, __def);
00328 }
00329
00330 template <class _S>
00331 inline bool ie_return_type::retrieve_from_info_i(const char* __s, int i,
00332 _S& __b, const _S& __def) const
00333 {
00334 return retrieve_from_info(std::string(__s), i, __b, __def);
00335 }
00336
00337
00338 #endif