commons-issues mailing list archives

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


Gilles commented on MATH-389:

There is a lot of duplication between "DifferentiableMultivariateRealOptimizer" and "MultivariateRealOptimizer"
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
interface MultivariateRealOptimizer<T extends MultivariateRealFunction> {
   // ... All common methods

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

interface DifferentiableMultivariateRealOptimizer
extends MultivariateRealOptimizer<DifferentiableMultivariateRealFunction> {
   // ... All methods referring to "gradient".

What do you think?

> New superclass for "AbstractScalarDifferentiableOptimizer"
> ----------------------------------------------------------
>                 Key: MATH-389
>                 URL:
>             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

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message