When trying to translate the following C # code to F #, I struggle with the "using" keyword. The following snippet is from the ILNumerics library . How to translate the following?
ILRetArray<double> ObjFuncBFGS2D(ILInArray<double> X) {
using (ILScope.Enter(X)) {
return X[0] * X[0] + X[1] * X[1] + 2;
}
}
On the other hand, which libraries F # people tend to use for optimization? I use NLoptNet, but with very strange convergence issues with routines that converge correctly in Matlab, Julia, and Python. So the problem is with my F # translations (if this is more likely) or with the optimization libraries. This is what I hope to attach. Honestly, I'm a little surprised at the lack of numerical optimization material related to F # on the Internet.
source
share