Hello,
Thanks for creating ALGLIB!
I'm getting the following error:
1>main.obj : error LNK2019: unresolved external symbol "void __cdecl alglib::polynomialbar2pow(class alglib::barycentricinterpolant const &,class alglib::real_1d_array &)" (?polynomialbar2pow@alglib@@YAXABVbarycentricinterpolant@1@AAVreal_1d_array@1@@Z) referenced in function _main
When I compile the following code in MS Visual C++ 2008 Express:
Code:
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include "interpolation.h"
using namespace alglib;
int main(int argc, char **argv)
{
real_1d_array x = "[-4.71, -3.77, -2.83, -1.89, -0.25]";
real_1d_array y = "[0, 1, 2, 3, 4]";
ae_int_t m = 3;
double t = 0;
ae_int_t info;
barycentricinterpolant p;
polynomialfitreport rep;
double v;
polynomialfit(x, y, m, info, p, rep);
v = barycentriccalc(p, t);
printf("%.2f\n", double(v));
real_1d_array a_eqdist;
polynomialbar2pow(p, a_eqdist);
printf("%s\n", a_eqdist.tostring(4).c_str());
return 0;
}
Please advise because I'm not sure what I'm doing wrong.
Thanks and regards,
Michael