25 void bsplpp_(
float *t,
float *bcoef,
int *n,
int *k,
float scrtch[][4],
float *breakp,
float coef[][4],
int *l);
26 float smooth_(
float *
x,
float *
y,
float *
dy,
int *npoint,
float *s,
float v[][7],
float a[][4]);
27 void csaps_(
float *
x,
float *
y,
float *
dy,
int *npoint,
float *s,
float *
result);
33 float t[11]= {0., 0., 0., 0., 1., 3., 4., 6., 6., 6., 6.};
34 float bcoef[7] = {0., 0., 0., 1., 0., 0., 0.};
38 bsplpp_(t,bcoef,&n,&k,scrtch,breakp,coef,&l);
40 for (
int i=0; i<5; i++)
41 cout<<breakp[i]<<
'\t';
44 for (
int i=0; i<4; i++)
45 for (
int j=0; j<4; j++)
46 cout<<coef[j][i]<<
'\t';
48 cout<<
"l : "<<l<<endl;
56 for (
int i=0; i<
N; i++) {
72 cout<<
"DeBoor::deleteMatrices"<<endl;
84 cout<<
"DeBoor::createMatrix, k="<<k<<endl;
87 for (
int i=0; i<
N; i++)
89 for (
int i=0; i<
N; i++) {
125 if (resultCSAPS.size()<n)
126 resultCSAPS.resize(n);
127 csaps_(x, y, dy, &n, &s, &resultCSAPS[0]);
128 cout<<
"y, results"<<endl;
129 for (
int i=0; i<n; i++)
130 cout<<y[i]<<
'\t'<<resultCSAPS[i]<<
'\n';
134 if (i<resultCSAPS.size() && i>0)
135 return resultCSAPS[i];
void deleteMatrix(float **m)
float smooth_(float *x, float *y, float *dy, int *npoint, float *s, float v[][7], float a[][4])
float **& createMatrix(int k)
void csaps_(float *x, float *y, float *dy, int *npoint, float *s, float *result)
void csaps(float *x, float *y, float *dy, int n, float s)
void bsplpp_(float *t, float *bcoef, int *n, int *k, float scrtch[][4], float *breakp, float coef[][4], int *l)
void createMatrices(int n)
void deleteMatrices()
Delete memory.