Uploaded image for project: 'Commons Math'
  1. Commons Math
  2. MATH-1151

Cast can fail in "LazyUnweightedEvaluation"

    XMLWordPrintableJSON

    Details

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

      Description

      In "LeastSquaresFactory.java" at line 487, a cast is performed that will fail when the "model" argument is not instantiated with the "model" method (defined at line 278).

      A fix could consist in the methods defined in (currently internal, line 291) class "LocalMultivariateJacobianFunction" becoming part of the public API, in an extension of the "MultivariateJacobianFunction" interface.
      The contructor of "LocalLeastSquaresProblem" (at line 371) should then throw an exception if lazy evaluation is requested but the "model" does not implement the appropriate interface.

        Attachments

        1. MATH-1151.patch
          11 kB
          Gilles Sadowski

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: