forum.alglib.net

ALGLIB forum
It is currently Thu Mar 28, 2024 9:26 pm

All times are UTC


Forum rules


1. This forum can be used for discussion of both ALGLIB-related and general numerical analysis questions
2. This forum is English-only - postings in other languages will be removed.



Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Resolved: MinLMOptimize in c++
PostPosted: Mon Jan 17, 2011 12:50 pm 
Offline

Joined: Mon Oct 18, 2010 6:55 am
Posts: 8
Hi,

I love AlgLib and plug it to anyone listening, great job.

I use AlgLib 3.2. I've previously used the MinLMCreateV in c# without a hitch, but when I try to implement the same code in c++ I run into problems with MinLMOptimize. The c# code:

double epsg = 0.0000000001;
double epsf = 0;
double epsx = 0;
int maxits = 0;
alglib.minlmstate state;
alglib.minlmreport rep;

alglib.minlmcreatev(fixedZeroRate.Count, FixedZeroRate, 0.0001, out state);
alglib.minlmsetcond(state, epsg, epsf, epsx, maxits);
alglib.minlmoptimize(state, CurvesMinimizationFunction, null, null);
alglib.minlmresults(state, out FixedZeroRate, out rep);

It cannot find a suitable overload function. I've tried with 1 and 2 nulls and casted pointer voids without any luck. In your examples, you only have 2 inputs - minlmoptimize(state, function1_fvec); - but I cannot get that to compile either. The c++ code:

alglib::minlmoptimize(state, CurvesMinimizationFunction); => too few arguments + intellisense cannot find overloaded function
alglib::minlmoptimize(state, CurvesMinimizationFunction, NULL, NULL); => intellisense cannot find overloaded function
alglib::minlmoptimize(state, CurvesMinimizationFunction, (void*)NULL, (void*)NULL); => intellisense cannot find overloaded function

I'm sure it's simple and that I'm an idiot yet again, but what should/can I do?

Update:
Solved the issue myself. Had a dll export tag on the function which is what I think caused the problem.


Thks


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 52 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group