ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkEigenLevenbergMarquardtEngine.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * https://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18#ifndef itkEigenLevenbergMarquardtEngine_h
19#define itkEigenLevenbergMarquardtEngine_h
20
21#include "ITKOptimizersExport.h"
22#include "vnl/vnl_vector.h"
23#include <functional>
24
25namespace itk::detail
26{
33{
34 unsigned long maxFunctionEvaluations{ 2000 };
35 double xTolerance{ 1e-8 };
36 double gradientTolerance{ 1e-5 };
37 double functionTolerance{ 1e-8 };
38 double epsilonFunction{ 1e-11 };
39};
40
43{
44 vnl_vector<double> solution;
45 int status{ 0 };
46 bool converged{ false };
47 unsigned int numberOfEvaluations{ 0 };
48 double residualNorm{ 0.0 };
49};
50
66ITKOptimizers_EXPORT EigenLevenbergMarquardtResult
67EigenLevenbergMarquardtSolve(unsigned int numberOfParameters,
68 unsigned int numberOfResiduals,
69 const std::function<void(const double *, double *)> & residual,
70 const std::function<void(const double *, double *)> & jacobian,
71 const vnl_vector<double> & initialPosition,
72 const EigenLevenbergMarquardtOptions & options);
73} // namespace itk::detail
74
75#endif
ITKOptimizers_EXPORT EigenLevenbergMarquardtResult EigenLevenbergMarquardtSolve(unsigned int numberOfParameters, unsigned int numberOfResiduals, const std::function< void(const double *, double *)> &residual, const std::function< void(const double *, double *)> &jacobian, const vnl_vector< double > &initialPosition, const EigenLevenbergMarquardtOptions &options)
Solve a nonlinear least-squares problem with Eigen's MINPACK-port Levenberg-Marquardt (unsupported/Ei...
Tolerances and limits for the Eigen Levenberg-Marquardt engine.
Result of an Eigen Levenberg-Marquardt minimization.