MCPcopy Create free account
hub / github.com/abess-team/abess / eval_spline3d

Function eval_spline3d

python/include/unsupported/test/splines.cpp:97–131  ·  view source on GitHub ↗

compares evaluations against known results */

Source from the content-addressed store, hash-verified

95
96/* compares evaluations against known results */
97void eval_spline3d()
98{
99 Spline3d spline = spline3d();
100
101 RowVectorXd u(10);
102 u << 0.351659507062997,
103 0.830828627896291,
104 0.585264091152724,
105 0.549723608291140,
106 0.917193663829810,
107 0.285839018820374,
108 0.757200229110721,
109 0.753729094278495,
110 0.380445846975357,
111 0.567821640725221;
112
113 MatrixXd pts(10,3);
114 pts << 0.707620811535916, 0.510258911240815, 0.417485437023409,
115 0.603422256426978, 0.529498282727551, 0.270351549348981,
116 0.228364197569334, 0.423745615677815, 0.637687289287490,
117 0.275556796335168, 0.350856706427970, 0.684295784598905,
118 0.514519311047655, 0.525077224890754, 0.351628308305896,
119 0.724152914315666, 0.574461155457304, 0.469860285484058,
120 0.529365063753288, 0.613328702656816, 0.237837040141739,
121 0.522469395136878, 0.619099658652895, 0.237139665242069,
122 0.677357023849552, 0.480655768435853, 0.422227610314397,
123 0.247046593173758, 0.380604672404750, 0.670065791405019;
124 pts.transposeInPlace();
125
126 for (int i=0; i<u.size(); ++i)
127 {
128 Vector3d pt = spline(u(i));
129 VERIFY( (pt - pts.col(i)).norm() < 1e-14 );
130 }
131}
132
133/* compares evaluations on corner cases */
134void eval_spline3d_onbrks()

Callers 1

test_splinesFunction · 0.85

Calls 5

spline3dFunction · 0.85
transposeInPlaceMethod · 0.80
sizeMethod · 0.45
normMethod · 0.45
colMethod · 0.45

Tested by

no test coverage detected