52 std::vector< RealPoint > points;
53 points.push_back(
RealPoint( { 0.0, 0.0 } ) );
54 points.push_back(
RealPoint( { 1.0, 0.0 } ) );
55 points.push_back(
RealPoint( { 2.0, 0.0 } ) );
56 points.push_back(
RealPoint( { 2.0, 1.0 } ) );
57 points.push_back(
RealPoint( { 2.0, 2.0 } ) );
58 points.push_back(
RealPoint( { 1.0, 2.0 } ) );
59 points.push_back(
RealPoint( { 0.0, 2.0 } ) );
60 points.push_back(
RealPoint( { 0.0, 1.0 } ) );
62 typedef std::vector< RealPoint >::const_iterator ConstIteratorOnPoints;
65 for (
unsigned int n = 1; n < 10; ++n )
67 trace.
info() <<
"Binomial convolver n=" << n << std::endl;
68 MyBinomialConvolver bcc( n );
69 bcc.init( 1.0, points.begin(), points.end(),
true );
70 for (
unsigned int i = 0; i < 8; ++i )
72 <<
" " << bcc.x( i ).first
73 <<
" " << bcc.x( i ).second
74 <<
" " << bcc.tangent( i ).first
75 <<
" " << bcc.tangent( i ).second
76 <<
" " << bcc.curvature( i )
79 unsigned int n = MyBinomialConvolver::suggestedSize( 1.0, points.begin(), points.end() );
80 trace.
info() <<
"Binomial convolver suggested n="
92 BCTangentEstimator tgtEstimator;
93 BCCurvatureEstimator curvEstimator;
95 tgtEstimator.init( 1.0, points.begin(), points.end(),
true );
96 curvEstimator.init( 1.0, points.begin(), points.end(),
true );
97 for ( ConstIteratorOnPoints it = points.begin(), it_end = points.end();
101 <<
" " << tgtEstimator.eval( it )
102 <<
" " << curvEstimator.eval( it )