Hi,
I've run into a couple of problems trying to get
simulated-annealing-examples to run; they both have to do with the
sample generic function.
The first problem is that trivial-example-step calls sample with
'uniform as an argument instead of :uniform. I've attached a patch to
fix this (although a patch is probably overkill since it's such a
trivial fix).
The second problem is trickier, and I don't quite know what to do
about it. Basically, only the mpointer of the random-number-generator
that is passed to simulated-annealing is passed through to
simulated-annealing-int, which means that only the mpointer is passed
to trivial-example-step. This results in an error when
trivial-example-step tries to call sample on the passed-in mpointer,
because sample only has methods defined for random-number-generators.
I tried changing sa-step-function to wrap the mpointer in a
random-number-generator before passing it through to the
user-step-function, but that seems to cause memory problems (I think
the wrappers free the underlying random number generator too many
times when they get garbage-collected).
Has this sort of problem been fixed elsewhere in the codebase? If
not, does anyone have any ideas about how to fix this?
Thanks,
James