22 const long n_quad_pts = tmp.weights.size();
24 quad.
points = Eigen::MatrixXd(n_quad_pts * n_quad_pts, 2);
25 quad.
weights = Eigen::MatrixXd(n_quad_pts * n_quad_pts, 1);
27 for (
long i = 0; i < n_quad_pts; ++i)
29 for (
long j = 0; j < n_quad_pts; ++j)
31 quad.
points.row(i * n_quad_pts + j) = Eigen::Vector2d(tmp.points(j), tmp.points(i));
32 quad.
weights(i * n_quad_pts + j) = tmp.weights(i) * tmp.weights(j);
36 assert(fabs(quad.
weights.sum() - 1) < 1e-14);
37 assert(quad.
points.minCoeff() >= 0 && quad.
points.maxCoeff() <= 1);