1 | initial version |
if you look at the MinProblemSolver::Function interface, you'll see, that there are actually two pure virtual functions to implement (yea, doc fail ..), so, you'll need an implementation for MinProblemSolver::Function::getDims()
maybe like this:
class DistanceToLines :public MinProblemSolver::Function
{
public:
double calc(const double* x)const
{
return x[0] * x[0] + x[1] * x[1];
}
int getDims() const
{
return 2;
}
};
2 | No.2 Revision |
if you look at the MinProblemSolver::Function interface, you'll see, that there are actually two pure virtual functions to implement (yea, doc fail ..), ., also it wasn't in the 3.0 version, your example is refering to),
so, you'll need an implementation for MinProblemSolver::Function::getDims()
maybe like this:
class DistanceToLines :public MinProblemSolver::Function
{
public:
double calc(const double* x)const
{
return x[0] * x[0] + x[1] * x[1];
}
int getDims() const
{
return 2;
}
};