CGAL 4.7 - Scale-Space Surface Reconstruction: WeightedApproximation_3 Concept Reference

\( \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
List of all members
WeightedApproximation_3 Concept Reference
Concepts

## Definition

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:
  `CGAL::Weighted_PCA_approximation_3`

## Types

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

## Constructors

| 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.

## Approximation

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

## Fitting

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.

Parameters

  size | is the size of the points set.

Note
  this does not compute the approximation.

## Member Function Documentation

bool WeightedApproximation_3::compute | ( | ) |  |

computes the approximation.

Returns
  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.

Parameters

  p | is the point to fit.

Returns
  the point on the approximation closest to `p`.

Precondition
  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.

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