\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.5 - Principal Component Analysis
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages

template<typename InputIterator >
Deduced CGAL::bounding_box (InputIterator first, InputIterator beyond)
 The function bounding_box() computes the axis-aligned bounding box of a set of 2D or 3D points. More...
 
template<typename InputIterator , typename K >
Deduced CGAL::bounding_box (InputIterator first, InputIterator beyond, const K &k)
 computes the bounding box of a non-empty set of 2D or 3D points. More...
 

Function Documentation

template<typename InputIterator >
Deduced CGAL::bounding_box ( InputIterator  first,
InputIterator  beyond 
)

The function bounding_box() computes the axis-aligned bounding box of a set of 2D or 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.

There is a set of overloaded bounding_box functions for 2D and 3D points. The user can also optionally pass an explicit kernel, in case the default, based on Kernel_traits is not sufficient. The dimension is also deduced automatically.

computes the bounding box of a non-empty set of 2D or 3D points.

Returns
The return type is either K::Iso_rectangle_2 or K::Iso_cuboid_3, depending on the dimension of the input values, where K is
Precondition
first != beyond.

#include <CGAL/bounding_box.h>

Examples:
Principal_component_analysis/bounding_box.cpp.
template<typename InputIterator , typename K >
Deduced CGAL::bounding_box ( InputIterator  first,
InputIterator  beyond,
const K &  k 
)

computes the bounding box of a non-empty set of 2D or 3D points.

Returns
The return type is either K::Iso_rectangle_2 or K::Iso_cuboid_3, depending on the dimension of the input values.
Precondition
first != beyond.

#include <CGAL/bounding_box.h>