28 #ifndef __ETL__BSPLINE_H
29 #define __ETL__BSPLINE_H
45 template <
class T,
class K=
float,
class C=affine_combo<T,K>,
class D=distance_func<T> >
46 class bspline :
public std::unary_function<K,T>
73 int set_m(
int new_m) {
m=new_m+1;
return m-1; };
96 for(i=1;i<(signed)
_cpoints.size()-m+1;i++)
108 for(i=0;i<=(signed)
_cpoints.size()-
m+1;i++)
134 if(i+1>=(
signed)
_knots.size())
148 if(i+1>=(
signed)
_knots.size())
168 for(j=0;d.size()>1 && j<level;d.pop_back(),j++)
170 for(k=0;k<d.size()-1;k++)
172 d[k]=
affine_func(d[k],d[k+1],((t-u[j+k+1])/(u[
m+k]-u[j+k+1])));
195 for(j=0;d.size()>1;d.pop_back(),j++)
197 for(k=0;k<(signed)d.size()-1;k++)
199 d[k]=
affine_func(d[k],d[k+1],((t-u[j+k+1])/(u[
m+k]-u[j+k+1])));
218 typename distance_func_type::result_type thisdist=
distance_func(point,*i);