Basic Image AlgorithmS Library
2.8.0
Main Page
Related Pages
Modules
Classes
Examples
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
MathAlgo
LevenbergMarquardtHelper.hh
1
#ifndef __LevenbergMarquardtHelper_hh__
2
#define __LevenbergMarquardtHelper_hh__
3
4
#include <bias_config.h>
5
6
namespace
BIAS
7
{
8
/**
9
@class LevenbergMarquardtHelper
10
@brief Simple helper class for Levenberg-Marquardt optimization.
11
12
This class keep track of the best solution computed by a Levenberg-
13
Marquardt optimization.
14
*/
15
class
BIASMathAlgo_EXPORT
LevenbergMarquardtHelper
16
{
17
public
:
18
19
/** @brief Create empty instance.
20
@note Call Init() to provide the number of variables and residuals! */
21
LevenbergMarquardtHelper
();
22
23
/** @brief Create new instance for given number of variables and
24
objective function residuals. */
25
LevenbergMarquardtHelper
(
int
numVars,
int
numResiduals);
26
27
/** @brief Releases the internally stored best variables. */
28
~
LevenbergMarquardtHelper
();
29
30
/** @brief Relocates internal array of best variables and resets the
31
best solution. */
32
void
Init(
int
numVars,
int
numResiduals);
33
34
/** @brief Add variables and results, and computes the sum of squares.
35
@return Returns if the new solution is better than the one stored. */
36
bool
Update(
const
double
*x,
const
double
*fvec);
37
38
/** @brief Returns pointer to internal array of best variables.
39
@note Returned pointer must NOT be released! */
40
inline
double
*
GetBestVars
()
const
{
return
vars_; }
41
42
protected
:
43
44
double
*
vars_
;
45
double
sumOfSquares_
;
46
int
numVars_
, numResiduals_;
47
48
};
49
50
}
51
52
#endif // __LevenbergMarquardtHelper_hh__
BIAS::LevenbergMarquardtHelper::numVars_
int numVars_
Definition:
LevenbergMarquardtHelper.hh:46
BIAS::LevenbergMarquardtHelper
Simple helper class for Levenberg-Marquardt optimization.
Definition:
LevenbergMarquardtHelper.hh:15
BIAS::LevenbergMarquardtHelper::GetBestVars
double * GetBestVars() const
Returns pointer to internal array of best variables.
Definition:
LevenbergMarquardtHelper.hh:40
BIAS::LevenbergMarquardtHelper::vars_
double * vars_
Definition:
LevenbergMarquardtHelper.hh:44
BIAS::LevenbergMarquardtHelper::sumOfSquares_
double sumOfSquares_
Definition:
LevenbergMarquardtHelper.hh:45
Generated on Tue Feb 6 2018 02:01:41 for Basic Image AlgorithmS Library by
1.8.5