\( \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.7 - Scale-Space Surface Reconstruction
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
WeightedApproximation_3 Concept Reference


A concept for computing an approximation of a weighted point set.

This approximation can be used to fit other points to the point set.

Has Models:


typedef unspecified_type FT
 defines the field number type.
typedef unspecified_type Point
 defines the point type.


 WeightedApproximation_3 (unsigned int size)
 constructs an approximation of a undefined point set. More...

Point Set.

void set_point (unsigned int i, const Point &p, const FT &w)
 changes a weighted point in the set. More...
std::size_t size () const
 gives the size of the weighted point set.


bool compute ()
 computes the approximation. More...
bool is_computed () const
 checks whether the approximation has been computed successfully.


Point fit (const Point &p)
 fits a point to the approximation. More...

Constructor & Destructor Documentation

WeightedApproximation_3::WeightedApproximation_3 ( unsigned int  size)

constructs an approximation of a undefined point set.

The point set holds a fixed number of points with undefined coordinates.

sizeis the size of the points set.
this does not compute the approximation.

Member Function Documentation

bool WeightedApproximation_3::compute ( )

computes the approximation.

whether the approximation converges. If the approximation does not converge this may indicate that the point set is too small, or the affine hull of the points cannot contain the approximation.
Point WeightedApproximation_3::fit ( const Point p)

fits a point to the approximation.

pis the point to fit.
the point on the approximation closest to p.
The approximation must have been computed.
void WeightedApproximation_3::set_point ( unsigned int  i,
const Point p,
const FT w 

changes a weighted point in the set.

This invalidates the approximation. compute() should be called after all points have been set.

i must be smaller than the total size of the point set.