[
https://issues.apache.org/jira/browse/MATH-389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12890341#action_12890341
]
Gilles commented on MATH-389:
-----------------------------
In fact, if we combine both ideas (base class and generics), I think that there
is no compatibility risk:
New base generic interface:
{code:title=BaseMultivariateRealOptimizer.java|borderStyle=solid}
interface BaseMultivariateRealOptimizer<T extends MultivariateRealFunction> {
// ... All common methods
RealPointValuePair optimize(T func, GoalType goal, double[] start);
}
{code}
And trivially modified (but backward compatible) "MultivariateRealOptimizer"
interface:
{code:title=MultivariateRealOptimizer.java|borderStyle=solid}
interface MultivariateRealOptimizer
extends BaseMultivariateRealOptimizer<MultivariateRealFunction> {}
{code}
> New superclass for "AbstractScalarDifferentiableOptimizer"
> ----------------------------------------------------------
>
> Key: MATH-389
> URL: https://issues.apache.org/jira/browse/MATH-389
> Project: Commons Math
> Issue Type: Improvement
> Reporter: Gilles
> Assignee: Gilles
> Priority: Trivial
> Fix For: 2.2
>
>
> In package {{optimization.general}}, I propose to create a new class:
> "AbstractScalarOptimizer". It would contain all code currently in
> "AbstractScalarDifferentiableOptimizer" that is not related to derivatives.
> "AbstractScalarDifferentiableOptimizer" would then extend that class to add
> the derivative-related code.
> This new layer in the hierarchy will be the base class for algorithms that do
> not use derivatives.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.