Commons Math
  1. Commons Math
  2. MATH-393

Method "getResult()" in "MultiStartUnivariateRealOptimizer"

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2
    • Labels:
      None

      Description

      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

       
      public double getResult() {
          return optima[0];
      }
      

      and similarly

      public double getFunctionValue() {
          return optimaValues[0];
      }
      

        Activity

        Luc Maisonobe made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Gilles made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.2 [ 12314501 ]
        Resolution Fixed [ 1 ]
        Gilles created issue -

          People

          • Assignee:
            Gilles
            Reporter:
            Gilles
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development