|
-
May 30th, 2010, 05:15 AM
#1
Very Simple C++ Wrapper :: HELP
Hi Guys,
I know there is a lot to say on Wrapper and there are many threads but I really don't get it as a newbie in C++.
I am trying to use a minimization algorithm called by:
double Calibration::Calibrate() {
...
CSimplex NMS(3,TOL,MAX_ITER,&functionToMinize);
...
}
The thing is functionToMinize is a member function and it has to take only a vector<double> as argument.
So I thought of a Wrapper.
Something like this:
double Wrapper_To_Call_Calibration(vector<double> x)
{
return wrapp -> functionToMinize(x);
}
Obviously this doesn't work. How should I proceed?
Create another class Wrapper with:
attribut Calibration*
constructor that initialize my pointor to my Calibration class.
Then define a function Wrapper_To_Call_Calibration inside this class?
I tried this but it doesn't work.
Any help please? (but very simple help, I am not expert in C++)...
Thanks a lot guys
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|