CGAL 4.6 - Principal Component Analysis
|
The function barycenter()
computes the barycenter (weighted center of mass) of a set of 2D or 3D weighted points.
The weight associated to each point is specified using a std::pair
storing the point and its weight.
There is a set of overloaded barycenter
functions for 2D and 3D weighted 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.
Functions | |
template<typename InputIterator > | |
Deduced | CGAL::barycenter (InputIterator first, InputIterator beyond) |
computes the barycenter of a non-empty set of 2D or 3D weighted points. More... | |
template<typename InputIterator , typename K > | |
Deduced | CGAL::barycenter (InputIterator first, InputIterator beyond, const K &k) |
computes the barycenter of a non-empty set of 2D or 3D weighted points. More... | |
Deduced CGAL::barycenter | ( | InputIterator | first, |
InputIterator | beyond | ||
) |
computes the barycenter of a non-empty set of 2D or 3D weighted points.
K::Point_2
or K::Point_3
depending on the dimension of the input values, where K
is InputIterator
must be std::pair<K::Point_2, K::FT>
or std::pair<K::Point_3, K::FT>
.#include <CGAL/barycenter.h>
Deduced CGAL::barycenter | ( | InputIterator | first, |
InputIterator | beyond, | ||
const K & | k | ||
) |
computes the barycenter of a non-empty set of 2D or 3D weighted points.
K::Point_2
or K::Point_3
depending on the dimension of the input values.InputIterator
must be std::pair<K::Point_2, K::FT>
or std::pair<K::Point_3, K::FT>
.#include <CGAL/barycenter.h>