82 std::vector<Point> data_vector;
84 data_vector.push_back(i);
87 const int num_repeats = 2000;
90 double tolerance_sq = 0.01;
92 for (
int rep = 0; rep < 3; rep++) {
93 std::clock_t
start = std::clock();
94 for (
int i = 0; i < num_repeats; i++) {
100 std::clock_t stop = std::clock();
101 std::cout <<
"bezier_fit_cubic_r C-array (" << num_repeats <<
"x): " << (stop -
start) * (1000. / CLOCKS_PER_SEC) <<
" ms "
105 for (
int rep = 0; rep < 3; rep++) {
106 std::clock_t
start = std::clock();
107 for (
int i = 0; i < num_repeats; i++) {
109 int n_segs = path.
size();
112 std::clock_t stop = std::clock();
113 std::cout <<
"bezier_fit_cubic_r 2Geom interoperability (" << num_repeats <<
"x): " << (stop -
start) * (1000. / CLOCKS_PER_SEC) <<
" ms "
117 for (
int rep = 0; rep < 3; rep++) {
118 std::clock_t
start = std::clock();
119 for (
int i = 0; i < num_repeats; i++) {
121 int n_segs = path.
size();
124 std::clock_t stop = std::clock();
125 std::cout <<
"bezier_fit_cubic_r 2Geom interoperability 2nd version (" << num_repeats
126 <<
"x): " << (stop -
start) * (1000. / CLOCKS_PER_SEC) <<
" ms " << std::endl;
int bezier_fit_cubic_r(Point bezier[], Point const data[], int len, double error, unsigned max_beziers)
Fit a multi-segment Bezier curve to a set of digitized points, with possible weedout of identical poi...