Hello.
Le mer. 4 août 2021 à 14:03, Jorge Garcia de Alba
<[email protected]> a écrit :
>
> Hello,
>
> I am interested in using the simplexsolver in a java language routine
> in hsqldb. Hsqldb requires that the body of the java language routine
> to be a static method. I wonder if such methods could be created and
> implemented so they could be easily be used in java language routines.
What is a "routine" in this context?
Writing a static function (in your application) would be fairly easy:
---CUT---
import org.apache.commons.math4.legacy.optim.OptimizationData;
import org.apache.commons.math4.legacy.optim.PointValuePair;
import org.apache.commons.math4.legacy.optim.linear.SimplexSolver;
public class MyMathUtils {
public static PointValuePair solve(/* list of params */) {
final SimplexSolver s = new SimplexSolver();
final OptimizationData[] data = /* populate with params */;
return s.optimize(data);
}
}
---CUT---
Best regards,
Gilles
> Great job.
>
> org.apache.commons.math3.optim.linear.SimplexSolver
>
> Jorge Garcia de Alba
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]