commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles (JIRA)" <j...@apache.org>
Subject [jira] Commented: (MATH-389) New superclass for "AbstractScalarDifferentiableOptimizer"
Date Tue, 20 Jul 2010 17:32:50 GMT

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


Mime
View raw message