diff --git a/Principal_component_analysis/doc_tex/Principal_component_analysis/intro.tex b/Principal_component_analysis/doc_tex/Principal_component_analysis/intro.tex index 5e860750cce..91775ac37fa 100644 --- a/Principal_component_analysis/doc_tex/Principal_component_analysis/intro.tex +++ b/Principal_component_analysis/doc_tex/Principal_component_analysis/intro.tex @@ -1,7 +1,8 @@ This \cgal\ package provides functions to compute global informations -on the shape of a set of 2D or 3D objects such as points. It provides the computation of bounding boxes, centroids of point sets, barycenters of weighted point sets, as well as linear least squares fitting. Linear least squares fitting approximates a set of objects by a linear -sub-space such as a line or a plane. -Formally, given a set of points in $R^d$, linear least squares fitting amounts +on the shape of a set of 2D or 3D objects such as points. It provides the computation of bounding boxes, centroids of point sets, barycenters of weighted point sets, as well as linear least squares fitting. + +Linear least squares fitting approximates a set of objects by a linear +sub-space such as a line or a plane. Formally, given a set of points in $R^d$, linear least squares fitting amounts to find the linear sub-space of $R^d$ which minimizes the sum of squared distances from the points to their projection onto this linear sub-space. This problem is equivalent to search for the linear sub-space which maximizes the @@ -10,7 +11,8 @@ of the covariance matrix. Eigenvectors corresponding to large eigenvalues are the directions in which the data has strong component, or equivalently large variance. If eigenvalues are the same there is no preferable sub-space. This package implements the linear least squares fitting for -several objects of a CGAL 2D or 3D kernel: the best fit 2D line for 2D +several objects of a \cgal\ 2D or 3D kernel: the best fit 2D line for 2D point sets, and the best fit 3D line or plane for point and -triangle sets. The object sets are specified by iterator ranges. +triangle sets. The object sets are specified by iterator ranges of +containers. diff --git a/Principal_component_analysis/doc_tex/Principal_component_analysis/main.tex b/Principal_component_analysis/doc_tex/Principal_component_analysis/main.tex index a10328e0592..72d20e71f62 100644 --- a/Principal_component_analysis/doc_tex/Principal_component_analysis/main.tex +++ b/Principal_component_analysis/doc_tex/Principal_component_analysis/main.tex @@ -10,7 +10,7 @@ \section{Examples} \label{subsec:pca_examples} -\subsection{Bounding box of a point set} +\subsection{Bounding Box of a Point Set} In the following example we use \stl\ containers of 2D and 3D points, and compute their bounding box. The kernel from which the input points @@ -18,7 +18,7 @@ come is automatically deduced by the function. \ccIncludeExampleCode{Principal_component_analysis/bounding_box.C} -\subsection{Centroid of a point set} +\subsection{Centroid of a Point Set} In the following example we use \stl\ containers of 2D and 3D points, and compute their centroid. The kernel from which the input points @@ -26,7 +26,7 @@ come is automatically deduced by the function. \ccIncludeExampleCode{Principal_component_analysis/centroid.C} -\subsection{Barycenter of a set of weighted points} +\subsection{Barycenter of a Set of Weighted Points} In the following example we use \stl\ containers of 2D and 3D weighted points, and compute their barycenter. The kernel from which the input points come is @@ -34,7 +34,7 @@ automatically deduced by the function. \ccIncludeExampleCode{Principal_component_analysis/barycenter.C} -\subsection{Best fitting line of a 2D point set} +\subsection{Best Fitting Line of a 2D Point Set} In the following example we use an \stl\ container of 2D points, and compute the best fitting line. The kernel from which the input points diff --git a/Principal_component_analysis/doc_tex/Principal_component_analysis_ref/centroid.tex b/Principal_component_analysis/doc_tex/Principal_component_analysis_ref/centroid.tex index ee494965e61..a1aef4177a2 100644 --- a/Principal_component_analysis/doc_tex/Principal_component_analysis_ref/centroid.tex +++ b/Principal_component_analysis/doc_tex/Principal_component_analysis_ref/centroid.tex @@ -54,14 +54,6 @@ The dimension is also deduced automatically. \ccPrecond{first != beyond.} } -%\ccExample -% -%In the following example we use \stl\ containers of 2D and 3D points, and -%compute their centroids. The kernel from which the input points -%come is automatically deduced by the function. -% -%\ccIncludeExampleCode{Linear_least_squares_fitting/centroid.C} - \ccSeeAlso \ccRefIdfierPage{CGAL::barycenter} diff --git a/Principal_component_analysis/doc_tex/Principal_component_analysis_ref/intro.tex b/Principal_component_analysis/doc_tex/Principal_component_analysis_ref/intro.tex index 933f8192983..0c1a50ec7a6 100644 --- a/Principal_component_analysis/doc_tex/Principal_component_analysis_ref/intro.tex +++ b/Principal_component_analysis/doc_tex/Principal_component_analysis_ref/intro.tex @@ -12,8 +12,11 @@ \ccChapterAuthor{Pierre Alliez and Sylvain Pion} -\subsection*{Definition} +This \cgal\ package provides functions to compute global informations +on the shape of a set of 2D or 3D objects such as points. It provides the computation of bounding boxes, centroids of point sets, barycenters of weighted point sets, as well as linear least squares fitting. It assumes the set of kernel primitive elements to be stored into an iterator range of a container. + +\subsection*{Definition} Given a point set in $R^d$, linear least squares fitting amounts to find the linear sub-space of $R^d$ which minimizes the sum of squared distances from the points to their projection onto this linear @@ -23,17 +26,7 @@ being obtained by eigen decomposition of the covariance matrix. Eigenvectors corresponding to large eigenvalues are the directions in which the data has strong component, or equivalently large variance. If eigenvalues are the same there is no preferable -sub-space.\\ - -This \cgal\ package implements the linear least squares fitting for -several objects of a CGAL 2D or 3D kernel: the best fit 2D line for 2D -point sets, and the best fit 3D line/plane for point and -triangle sets. It assumes the set of kernel primitive elements to be stored into an -iterator range of a container. Bounding box, centroid and barycenter -computations are provided as well. - -%\ccHeading{Concepts} -%\ccRefConceptPage{FittingTraits}\\ +sub-space. \ccHeading{Functions}