/*! ========================================================================
** Extended Template and Library
** B-Spline Class Implementation
/*! ========================================================================
** Extended Template and Library
** B-Spline Class Implementation
typedef typename knot_container::iterator knot_iterator;
typedef typename cpoint_container::iterator cpoint_iterator;
typedef C affine_func_type;
typedef D distance_func_type;
typedef typename knot_container::iterator knot_iterator;
typedef typename cpoint_container::iterator cpoint_iterator;
typedef C affine_func_type;
typedef D distance_func_type;
cpoint_iterator i=_cpoints.begin();
cpoint_iterator ret=i;
typename distance_func_type::result_type dist=distance_func(point,_cpoints[0]);
cpoint_iterator i=_cpoints.begin();
cpoint_iterator ret=i;
typename distance_func_type::result_type dist=distance_func(point,_cpoints[0]);
// The distance function returns "cooked" (ie: squared)
// distances, so we need to cook our max distance for
// the comparison to work correctly.
max=distance_func.cook(max);
// The distance function returns "cooked" (ie: squared)
// distances, so we need to cook our max distance for
// the comparison to work correctly.
max=distance_func.cook(max);
for(++i;i<_cpoints.end();i++)
{
typename distance_func_type::result_type thisdist=distance_func(point,*i);
for(++i;i<_cpoints.end();i++)
{
typename distance_func_type::result_type thisdist=distance_func(point,*i);