You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gilles (JIRA)" <ji...@apache.org> on 2010/07/20 19:32:50 UTC

[jira] Commented: (MATH-389) New superclass for "AbstractScalarDifferentiableOptimizer"

    [ https://issues.apache.org/jira/browse/MATH-389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12890338#action_12890338 ] 

Gilles commented on MATH-389:
-----------------------------

There is a lot of duplication between "DifferentiableMultivariateRealOptimizer" and "MultivariateRealOptimizer" interfaces.
We could have a new "BaseMultivariateRealOptimizer" interface that will contain all the declarations common to both of the current interfaces? Each of those will then contain their {{optimize}} method declaration, plus any other specific ones (such as those related to "gradient" in "DifferentiableMultivariateRealOptimizer").

An alternative (perhaps more elegant but maybe not backward-compatible) would be to have
{code:title=MultivariateRealOptimizer.java|borderStyle=solid}
interface MultivariateRealOptimizer<T extends MultivariateRealFunction> {
   // ... All common methods

   RealPointValuePair optimize(T func, GoalType goal, double[] start);
}
{code}

{code:title=DifferentiableMultivariateRealOptimizer.java|borderStyle=solid}
interface DifferentiableMultivariateRealOptimizer
extends MultivariateRealOptimizer<DifferentiableMultivariateRealFunction> {
   // ... All methods referring to "gradient".
}
{code}


What do you think?


> 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.