functors need not be const

This commit is contained in:
Thomas Capricelli 2009-09-11 20:50:01 +02:00
parent 72746838ad
commit 8b84c3733a
2 changed files with 4 additions and 4 deletions

View File

@ -3,7 +3,7 @@ template<typename FunctorType, typename Scalar=double>
class HybridNonLinearSolver class HybridNonLinearSolver
{ {
public: public:
HybridNonLinearSolver(const FunctorType &_functor) HybridNonLinearSolver(FunctorType &_functor)
: functor(_functor) {} : functor(_functor) {}
enum Status { enum Status {
@ -80,7 +80,7 @@ public:
int njev; int njev;
int iter; int iter;
private: private:
const FunctorType &functor; FunctorType &functor;
int n; int n;
Scalar sum; Scalar sum;
bool sing; bool sing;

View File

@ -3,7 +3,7 @@ template<typename FunctorType, typename Scalar=double>
class LevenbergMarquardt class LevenbergMarquardt
{ {
public: public:
LevenbergMarquardt(const FunctorType &_functor) LevenbergMarquardt(FunctorType &_functor)
: functor(_functor) {} : functor(_functor) {}
enum Status { enum Status {
@ -101,7 +101,7 @@ public:
int njev; int njev;
int iter; int iter;
private: private:
const FunctorType &functor; FunctorType &functor;
int n; int n;
int m; int m;
Matrix< Scalar, Dynamic, 1 > wa1, wa2, wa3, wa4; Matrix< Scalar, Dynamic, 1 > wa1, wa2, wa3, wa4;