14 , m_vConverged(nParams)
36 DGM_ASSERT_MSG(
m_vParams.size() == vParams.size(),
"The size of the argument (%zu) ddoes not correspond to the number of parameters (%zu)", vParams.size(),
m_nParams);
38 for (
size_t p = 0; p < vParams.size(); p++) {
39 const float& param = vParams[p];
41 DGM_WARNING(
"Argument[%zu]=%.2f exceeds the upper boundary %.2f and will not be set", p, param,
m_vMax[p]);
45 DGM_WARNING(
"Argument[%zu]=%.2f exceeds the lower boundary %.2f and will not be set", p, param,
m_vMin[p]);
54 DGM_ASSERT_MSG(
m_vMin.size() == vMinParam.size(),
"The size of the argument (%zu) ddoes not correspond to the number of parameters (%zu)", vMinParam.size(),
m_nParams);
56 for (
size_t p = 0; p < vMinParam.size(); p++) {
57 const float& minParam = vMinParam[p];
58 if (minParam >
m_vParams[p]) DGM_WARNING(
"Argument[%zu]=%.2f contradicts the parameter value %.2f and will not be set", p, minParam,
m_vParams[p]);
65 DGM_ASSERT_MSG(
m_vMax.size() == vMaxParam.size(),
"The size of the argument (%zu) ddoes not correspond to the number of parameters (%zu)", vMaxParam.size(),
m_nParams);
67 for (
size_t p = 0; p < vMaxParam.size(); p++) {
68 const float& maxParam = vMaxParam[p];
69 if (maxParam <
m_vParams[p]) DGM_WARNING(
"Argument[%zu]=%.2f contradicts the parameter value %.2f and will not be set", p, maxParam,
m_vParams[p]);
76 DGM_ASSERT_MSG(
m_vDeltas.size() == vDeltas.size(),
"The size of the argument (%zu) ddoes not correspond to the number of parameters (%zu)", vDeltas.size(),
m_nParams);
84 else DGM_WARNING(
"Negative acceleration value was not set");
90 DGM_ASSERT_MSG(kappa > 0.0f,
"Negative kappa values are not allowed");
92 #ifdef DEBUG_PRINT_INFO 95 for (
float& param :
m_vParams) printf(
"%.2f\t", param);
96 printf(
"%.2f\n", kappa);
178 for (
const bool& converged :
m_vConverged)
if (!converged)
return false;
void setMinParams(const vec_float_t &vMinParam)
Sets the lower boundary for parameters (arguments) search.
void setDeltas(const vec_float_t &vDeltas)
Sets the searching steps along the parameters (arguments)
null Delta (current position)
CPowell(size_t nParams)
Constructor.
void setAcceleration(float acceleration)
Sets the acceleration coefficient.
vec_float_t getParams(float val)
Gets the updated parameters (arguments)
void setInitParams(const vec_float_t &vParams)
Sets the initial parameters (arguments) for the search algorithm.
bool isConverged(void) const
Indicates weather the method has converged.
void reset(void)
Resets class variables.
void setMaxParams(const vec_float_t &vMaxParam)
Sets the upper boundary for parameters (arguments) search.