The function sibson_gradient_fitting approximates the gradient of a function at a point p given natural neighbor coordinates for p and its neighbors' function values. The approximation method is described in [Sib81]. Further functions are provided to fit the gradient for all data points that lie inside the convex hull of the data points. One function exists for each type of natural neighbor coordinates.
#include <CGAL/sibson_gradient_fitting.h>
template < class ForwardIterator, class Functor, class Traits> | ||||
typename Traits::Vector_d |
| |||
This function estimates the gradient of a function at the point p given natural neighbor coordinates of p in the range [. first, beyond.) and the function values of the neighbors provided by the functor f. norm is the normalization factor of the barycentric coordinates. |
template < class Dt, class OutputIterator, class Functor, class Traits> | ||
OutputIterator | sibson_gradient_fitting_nn_2 ( Dt dt, OutputIterator out, Functor f, Traits traits) | |
estimates the function gradients at all vertices of dt that lie inside the convex hull using the coordinates computed by the function natural_neighbor_coordinates_2. OutputIterator::value_type is a pair associating a point to a vector. The sequence of point/gradient pairs computed by this function is placed starting at out. The function returns an iterator that is placed past-the-end of the resulting sequence. The requirements are the same as above. The template class Dt must be equivalent to Delaunay_triangulation_2<Gt, Tds>. | ||
template < class Rt, class OutputIterator, class Functor, class Traits> | ||
OutputIterator | sibson_gradient_fitting_rn_2 ( Rt rt, OutputIterator out, Functor f, Traits traits) | |
estimates the function gradients at all vertices of rt that lie inside the convex hull using the coordinates computed by the function regular_neighbor_coordinates_2. OutputIterator::value_type is a pair associating a point to a vector. The sequence of point/gradient pairs computed by this function is placed starting at out. The function returns an iterator that is placed past-the-end of the resulting sequence. The requirements are the same as above. The template class Rt must be equivalent to Regular_triangulation_2<Gt, Tds>. |