mirror of https://github.com/CGAL/cgal
notation issues
This commit is contained in:
parent
0adb373823
commit
6f4b6ccd53
|
|
@ -68,11 +68,14 @@ linear_least_squares_fitting_2(InputIterator first,
|
||||||
// 0
|
// 0
|
||||||
// 1 2
|
// 1 2
|
||||||
//Final combined covariance matrix for all triangles and their combined mass
|
//Final combined covariance matrix for all triangles and their combined mass
|
||||||
FT mass=0.0,cov[3]={0.0,0.0,0.0};
|
FT mass = 0.0;
|
||||||
|
FT cov[3] = {0.0,0.0,0.0};
|
||||||
|
|
||||||
// step 1: assemble the 2nd order moment about the origin.
|
// step 1: assemble the 2nd order moment about the origin.
|
||||||
FT cov_temp[4] = {1.0,0.5,0.5,1.0};
|
FT cov_temp[4] = {1.0, 0.5,
|
||||||
|
0.5, 1.0};
|
||||||
Matrix covariance = (std::sqrt(2)/3.0) * init_Matrix<K>(2,cov_temp);
|
Matrix covariance = (std::sqrt(2)/3.0) * init_Matrix<K>(2,cov_temp);
|
||||||
|
|
||||||
for(InputIterator it = first;
|
for(InputIterator it = first;
|
||||||
it != beyond;
|
it != beyond;
|
||||||
it++)
|
it++)
|
||||||
|
|
@ -80,6 +83,7 @@ linear_least_squares_fitting_2(InputIterator first,
|
||||||
// Now for each triangle, construct the 2nd order moment about the origin.
|
// Now for each triangle, construct the 2nd order moment about the origin.
|
||||||
// step 2: assemble the transformation matrix.
|
// step 2: assemble the transformation matrix.
|
||||||
const Segment& t = *it;
|
const Segment& t = *it;
|
||||||
|
|
||||||
// defined for convenience.
|
// defined for convenience.
|
||||||
FT delta[4] = {t[0].x(), t[1].x(), t[0].y(), t[1].y()};
|
FT delta[4] = {t[0].x(), t[1].x(), t[0].y(), t[1].y()};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue