chebyshev.cpp revision 29684a16b6c92bee28a94fdc2607bcc143950fa8
#include "chebyshev.h"
#include "sbasis.h"
#include "sbasis-poly.h"
#include <vector>
#include <gsl/gsl_math.h>
#include <gsl/gsl_chebyshev.h>
namespace Geom{
}
}
return basis[n];
}
SBasis r;
for(unsigned i = 0; i < n; i++) {
double cof = cheb_coeff[i];
//if(i == 0)
//cof /= 2;
}
return r;
}
/** b_n = a_n
b_n-1 = 2*x*b_n + a_n-1
b_n-k = 2*x*b_{n-k+1} + a_{n-k} - b_{n - k + 2}
b_0 = x*b_1 + a_0 - b_2
*/
double a = -1, b = 1;
for(int j = m - 1; j >= 1; j--) {
}
}
gsl_function F;
F.function = f;
F.params = p;
gsl_cheb_free (cs);
return r;
}
struct wrap {
double (*f)(double,void*);
void* pp;
};
double f_interp(double x, void* p) {
}
SBasis chebyshev_approximant_interpolating (double (*f)(double,void*),
wr.f = f;
return compose(Linear(in[0], in[1]), Linear(fa, fb)) + chebyshev_approximant(f_interp, order, in, &wr) + Linear(fa, fb);
}
}
}
return basis[n];
}
};
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :