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
{
public:
HybridNonLinearSolver(const FunctorType &_functor)
HybridNonLinearSolver(FunctorType &_functor)
: functor(_functor) {}
enum Status {
@ -80,7 +80,7 @@ public:
int njev;
int iter;
private:
const FunctorType &functor;
FunctorType &functor;
int n;
Scalar sum;
bool sing;

View File

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