Looks like I was passing gsl_siman_solve a sizeof(double) instead of sizeof(STR), my structure. I believe I want to use the variable-sized option with copy constructors and destructors to handle my case.
On Thu, Apr 30, 2009 at 1:22 AM, Carl Boettiger <[email protected]> wrote: > Hi, > > I am finding strange behavior in the simulated annealing package. I > have modified the trivial example so that the state space can be > represented as a structure, rather than a single double value. This > is crucial for me as I need to pass my objective function that i am > trying to minimize several different parameters of different types. > This works fine for the trivial structure of one element. However, as > soon as I add another element to the structure _ahead_ of the element > I am varying to minimize my objective function, the routine fails. It > prints out a fixed and meaningless value in place of the variable I am > trying to minimize. If the structure is defined in the other order, > this does not happen. > > I've attached the code. I have no idea why I get this behavior. If > anyone has an example function that calls the simulated annealing > package using a statespace that is not a single value or array, I'd > appreciate it too. Thanks for your insights, > > Carl > -- > Carl Boettiger > Population Biology, UC Davis > http://two.ucdavis.edu/~cboettig > -- Carl Boettiger Population Biology, UC Davis http://two.ucdavis.edu/~cboettig _______________________________________________ Help-gsl mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gsl
