[
https://issues.apache.org/jira/browse/MATH-1151?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gilles resolved MATH-1151.
--------------------------
Resolution: Fixed
Committed in revision 1625967.
> Cast can fail in "LazyUnweightedEvaluation"
> -------------------------------------------
>
> Key: MATH-1151
> URL: https://issues.apache.org/jira/browse/MATH-1151
> Project: Commons Math
> Issue Type: Bug
> Reporter: Gilles
> Assignee: Gilles
> Priority: Minor
> Labels: API
> Fix For: 3.4
>
> Attachments: MATH-1151.patch
>
>
> 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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)