24 #ifndef _CRITERIA_COMBINED_HPP_ 25 #define _CRITERIA_COMBINED_HPP_ 27 #include <boost/ptr_container/ptr_vector.hpp> 28 #include <boost/numeric/ublas/vector_proxy.hpp> 49 mCriteriaList.push_back(crit);
52 void setParameters(
const vectord &theta)
54 using boost::numeric::ublas::subrange;
55 const size_t np = mCriteriaList.size();
58 for (
size_t i = 0; i < np; ++i)
60 sizes(i) = mCriteriaList[i].nParameters();
63 if (theta.size() != norm_1(sizes))
65 FILE_LOG(logERROR) <<
"Wrong number of criteria parameters";
66 throw std::invalid_argument(
"Wrong number of criteria parameters");
70 for (
size_t i = 0; i < np; ++i)
72 mCriteriaList[i].setParameters(subrange(theta,start,start+sizes(i)));
80 for (
size_t i = 0; i < mCriteriaList.size(); ++i)
82 sum += mCriteriaList[i].nParameters();
88 boost::ptr_vector<Criteria> mCriteriaList;
Namespace of the library interface.
Abstract class to implement Bayesian regressors.
Abstract class for combined criteria functions.
Abstract interface for criteria functors.
Abstract and factory modules for criteria.