diff --git a/Principal_component_analysis/doc_tex/Principal_component_analysis/examples.tex b/Principal_component_analysis/doc_tex/Principal_component_analysis/examples.tex index 4019c515673..0084611c353 100644 --- a/Principal_component_analysis/doc_tex/Principal_component_analysis/examples.tex +++ b/Principal_component_analysis/doc_tex/Principal_component_analysis/examples.tex @@ -1,7 +1,7 @@ \section{Examples\label{subsec:pca_examples}} \subsection{Bounding Box} -In the following example we use \stl\ containers of 2D points, 3D points and 3D segments, and compute their axis-aligned bounding box. The kernel from which the input points originate is automatically deduced by the function. +In the following example we use \stl\ containers of 2D points and 3D points, and compute their axis-aligned bounding box. The kernel from which the input points originate is automatically deduced by the function. \ccIncludeExampleCode{Principal_component_analysis/bounding_box.cpp} \subsection{Centroid} diff --git a/Principal_component_analysis/doc_tex/Principal_component_analysis_ref/bounding_box.tex b/Principal_component_analysis/doc_tex/Principal_component_analysis_ref/bounding_box.tex index c2b046ccbf0..7850285b97e 100644 --- a/Principal_component_analysis/doc_tex/Principal_component_analysis_ref/bounding_box.tex +++ b/Principal_component_analysis/doc_tex/Principal_component_analysis_ref/bounding_box.tex @@ -12,14 +12,11 @@ \ccDefinition -The function \ccRefName\ computes the axis-aligned bounding box of a set of 2D or 3D objects. The function is implemented for all \emph{bounded} objects from the 2D and 3D kernels such as points, segments, triangles, tetrahedra, etc. The bounding box is returned either as an iso rectangle in 2D or as an iso cuboid in 3D, the type being deduced automatically from the value type of the iterator range. +The function \ccRefName\ computes the axis-aligned bounding box of a set of 2D and 3D points. The bounding box is returned either as an iso rectangle in 2D or as an iso cuboid in 3D, the type being deduced automatically from the value type of the iterator range. \ccInclude{CGAL/bounding_box.h} -There is a set of overloaded \ccc{bounding_box} functions for 2D and 3D objects. -The user can also optionally pass an explicit kernel, in case the default, -based on \ccc{Kernel_traits} is not sufficient. -The dimension is also deduced automatically. +There is a set of overloaded \ccc{bounding_box} functions for 2D and 3D points. The user can also optionally pass an explicit kernel, in case the default, based on \ccc{Kernel_traits} is not sufficient. The dimension is also deduced automatically. \ccFunction{template < typename InputIterator > K::Iso_rectangle_2 diff --git a/Principal_component_analysis/examples/Principal_component_analysis/bounding_box.cpp b/Principal_component_analysis/examples/Principal_component_analysis/bounding_box.cpp index c5101f52969..cff4fe798a6 100644 --- a/Principal_component_analysis/examples/Principal_component_analysis/bounding_box.cpp +++ b/Principal_component_analysis/examples/Principal_component_analysis/bounding_box.cpp @@ -1,5 +1,4 @@ -// Example program for the bounding_box() function for 2D points, -// 3D points and 3D segments. +// Example program for the bounding_box() function for 2D points and 3D points. #include #include @@ -12,7 +11,6 @@ typedef CGAL::Cartesian K; typedef K::Point_2 Point_2; typedef K::Point_3 Point_3; typedef K::Point_3 Point_3; -typedef K::Segment_3 Segment_3; int main() { @@ -34,16 +32,5 @@ int main() K::Iso_cuboid_3 c3 = CGAL::bounding_box(points_3.begin(), points_3.end()); std::cout << c3 << std::endl; - // axis-aligned bounding box of 3D segments - std::list segments_3; - Point_3 p(1.0, 2.0, 3.0); - Point_3 q(4.0, 5.0, 6.0); - Point_3 r(3.0, 3.0, 0.5); - segments_3.push_back(Segment_3(p,q)); - segments_3.push_back(Segment_3(p,r)); - - c3 = CGAL::bounding_box(segments_3.begin(), segments_3.end()); - std::cout << c3 << std::endl; - return 0; }