56int main (
int argc ,
char * argv[] )
60 std::cerr <<
"please pass the spline degree on the command line"
65 int degree = std::atoi ( argv[1] ) ;
69 std::cout <<
"rising degree to 4, the minimum for this program" << std::endl ;
73 assert ( degree >= 4 && degree <= vspline_constants::max_degree ) ;
106 + vspline::make_safe_evaluator < spline_type , long double > ( bsp ) ) ;
131 vigra::TinyVector < int , 1 > derivative ;
157 while ( std::cin.good() )
159 std::cout <<
" angle in degrees > " ;
163 if ( std::cin.eof() )
165 std::cout << std::endl ;
169 long double xs = x * M_PI / 180.0L ;
174 std::cout <<
"sin(" << x <<
") = "
175 << sin ( xs ) << std::endl
176 <<
"cos(" << x <<
") = "
177 << cos ( xs ) << std::endl
178 <<
"splinus(" << x <<
") = "
179 << splinus ( x ) << std::endl
180 <<
"splinus2(" << x <<
") = "
181 << splinus2 ( x ) << std::endl
182 <<
"difference sin/splinus: "
183 << sin ( xs ) - splinus ( x ) << std::endl
184 <<
"difference sin/splinus2: "
185 << sin ( xs ) - splinus2 ( x ) << std::endl
186 <<
"difference splinus/splinus2: "
187 << splinus2 ( x ) - splinus ( x ) << std::endl
188 <<
"derivatives: " << splinus_d1 ( x ) / M_PI
189 <<
" " << splinus_d2 ( x ) / ( M_PI * M_PI )
190 <<
" " << splinus_d3 ( x ) / ( M_PI * M_PI * M_PI ) << std::endl ;
vspline::bspline< pixel_type, 2 > spline_type
class evaluator encodes evaluation of a spline-like object. This is a generalization of b-spline eval...
vspline::domain_type< coordinate_type, _vsize > domain(const coordinate_type &in_low, const coordinate_type &in_high, const coordinate_type &out_low, const coordinate_type &out_high)
factory function to create a domain_type type object from the desired lower and upper fix point for i...
vspline::periodic_gate< rc_type, _vsize > periodic(rc_type lower, rc_type upper)
factory function to create a periodic_gate type functor given a lower and upper limit for the allowed...
vspline::grok_type< typename grokkee_type::in_type, typename grokkee_type::out_type, grokkee_type::vsize > grok(const grokkee_type &grokkee)
grok() is the corresponding factory function, wrapping grokkee in a vspline::grok_type.
int main(int argc, char *argv[])
class bspline now builds on class bspline_base, adding coefficient storage, while bspline_base provid...
void prefilter(vspline::xlf_type boost=vspline::xlf_type(1), int njobs=vspline::default_njobs)
prefilter converts the knot point data in the 'core' area into b-spline coefficients....
class grok_type is a helper class wrapping a vspline::unary_functor so that it's type becomes opaque ...
includes all headers from vspline (most of them indirectly)