16 const PARAMS& params_max) {
17 m_params_min = params_min;
18 m_params_max = params_max;
19 if (m_params_min.empty() || m_params_max.empty() ) {
21 }
else if (m_params_min.size() != m_params_min.size() ) {
22 throw std::invalid_argument (
"invalid minimum and maximum parameters");
24 for (
int k = 0; k < params_min.size(); ++k) {
25 if (m_params_min[k] > m_params_max[k]) {
26 throw std::invalid_argument (
"invalid minimum and maximum parameters");
32 const double gamma)
const {
33 if (!m_params_max.empty() && (fabs (gamma) >= m_params_max[k]) ) {
35 <<
" parameters not updated: gamma < minimum parameter value of " 36 << m_params_max[k] <<
'\n';
39 if (!m_params_min.empty() && (fabs (gamma) <= m_params_min[k]) ) {
41 <<
" parameters not updated: gamma > maximum parameter value of " 42 << m_params_min[k] <<
'\n';
void Initialize(const PARAMS ¶ms_min, const PARAMS ¶ms_max)
bool check_in_range(const unsigned int k, const double gamma) const