Subject: CGAL users discussion list
List archive
- From: Yong Xiao <>
- To:
- Subject: [cgal-discuss] A bug or not? Questions about "linear_least_squares_fitting_3"
- Date: Thu, 28 Jun 2012 19:55:45 -0700 (PDT)
I seem to find a bug of "linear_least_squares_fitting_3".
I am interesting in fitting quality of plane and line least squares
estimating of CGAL, so I find the source file
"c:\CGAL-4.0\include\CGAL\linear_least_squares_fitting_points_3.h" and
"C:\CGAL-4.0\include\CGAL\PCA_util.h" and locate the functions.
In linear_least_squares_fitting_points_3.h, it is said
"returns a fitting quality *(1 - lambda_min/lambda_max)*:"
// fits a plane to a 3D point set
// returns a fitting quality *(1 - lambda_min/lambda_max)*:
// 1 is best (zero variance orthogonally to the fitting line)
// 0 is worst (isotropic case, returns a plane with default direction)
template < typename InputIterator,
typename K >
typename K::FT
linear_least_squares_fitting_3(InputIterator first,
InputIterator beyond,
typename K::Plane_3& plane, // best fit plane
typename K::Point_3& c, // centroid
const typename K::Point_3*, // used for
indirection
const K& k, // kernel
const
CGAL::Dimension_tag<0>& tag).
And the fitting quality in fact is computed by function fitting_plane_3
which is defined in PCAutil.h.
But in PCAutil.h, in the function fitting_plane_3, the fitting quality is
computed by *(1.0-lambda_min/lambda_middle) *. The comments
linear_least_squares_fitting_3 do not match the real computation methods.
Are the comments wrong? or the codes in PCAutil.h wrong?
Does the comments of
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/A-bug-or-not-Questions-about-linear-least-squares-fitting-3-tp4655324.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] A bug or not? Questions about "linear_least_squares_fitting_3", Yong Xiao, 06/29/2012
Archive powered by MHonArc 2.6.18.