This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Parameter vectors declared as const in minimized functions


Hi!

I have a question about (multidimensional) minimization functions; why
does a first argument to the function have to be a const gsl_vector *
type? I understand one should not attempt to change the contents of this
vector during unconstrained minimization, since that's minimizer's job,
but doesn't it unnecessarily restrict the method?

To make my question a bit more practical, let me explain my motivation:
I'm running a multidimensional NMS minimizer on a ~30D hyperspace to find
the minimum of the chi2 value = (observed-calculated)^2. Obviously this
dimension is very high and it is sometimes possible to find constraints
among particular parameters, at other times perhaps boundaries of the
hyperspace to perform semi-constrained minimization. Since these
constraints/boundaries are changing from case to case, they cannot be
hard-coded. So to add a simple if-clause stating: if parameter falls out
of prescribed bounds, set its value to the boundary value, one would need
to modify the value of the passed parameter vector within the chi2
function. That's why it would be useful if the passed gsl_vector * wasn't
declared as const. What do you think?

Thanks for your help and comments,

Andrej


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]