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/25 02:14:52 UTC
[jira] Created: (MATH-393) Method "getResult()" in
"MultiStartUnivariateRealOptimizer"
Method "getResult()" in "MultiStartUnivariateRealOptimizer"
-----------------------------------------------------------
Key: MATH-393
URL: https://issues.apache.org/jira/browse/MATH-393
Project: Commons Math
Issue Type: Bug
Reporter: Gilles
Assignee: Gilles
Priority: Trivial
In "MultiStartUnivariateRealOptimizer" (package "optimization"), the method "getResult" returns the result of the last run of the "underlying" optimizer; this last result might not be the best one, in which case it will not correspond to the value returned by the "optimize" method. This is confusing and does not seem very useful. I think that "getResult" should be defined as
{code}
public double getResult() {
return optima[0];
}
{code}
and similarly
{code}
public double getFunctionValue() {
return optimaValues[0];
}
{code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MATH-393) Method "getResult()" in
"MultiStartUnivariateRealOptimizer"
Posted by "Luc Maisonobe (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MATH-393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12892083#action_12892083 ]
Luc Maisonobe commented on MATH-393:
------------------------------------
You're right.
Don't forget to fix also the Javadoc in the interface which is also misleading when you fiw this. I have checked other implementations of this interface (BrentMinimizer) and what it returns is really the optimum.
> Method "getResult()" in "MultiStartUnivariateRealOptimizer"
> -----------------------------------------------------------
>
> Key: MATH-393
> URL: https://issues.apache.org/jira/browse/MATH-393
> Project: Commons Math
> Issue Type: Bug
> Reporter: Gilles
> Assignee: Gilles
> Priority: Trivial
>
> In "MultiStartUnivariateRealOptimizer" (package "optimization"), the method "getResult" returns the result of the last run of the "underlying" optimizer; this last result might not be the best one, in which case it will not correspond to the value returned by the "optimize" method. This is confusing and does not seem very useful. I think that "getResult" should be defined as
> {code}
> public double getResult() {
> return optima[0];
> }
> {code}
> and similarly
> {code}
> public double getFunctionValue() {
> return optimaValues[0];
> }
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (MATH-393) Method "getResult()" in
"MultiStartUnivariateRealOptimizer"
Posted by "Gilles (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MATH-393?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gilles resolved MATH-393.
-------------------------
Fix Version/s: 2.2
Resolution: Fixed
Changed in revision 979032.
> Method "getResult()" in "MultiStartUnivariateRealOptimizer"
> -----------------------------------------------------------
>
> Key: MATH-393
> URL: https://issues.apache.org/jira/browse/MATH-393
> Project: Commons Math
> Issue Type: Bug
> Reporter: Gilles
> Assignee: Gilles
> Priority: Trivial
> Fix For: 2.2
>
>
> In "MultiStartUnivariateRealOptimizer" (package "optimization"), the method "getResult" returns the result of the last run of the "underlying" optimizer; this last result might not be the best one, in which case it will not correspond to the value returned by the "optimize" method. This is confusing and does not seem very useful. I think that "getResult" should be defined as
> {code}
> public double getResult() {
> return optima[0];
> }
> {code}
> and similarly
> {code}
> public double getFunctionValue() {
> return optimaValues[0];
> }
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.