\( \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.10 - 2D and Surface Function Interpolation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
CGAL::Data_access< Map > Struct Template Reference

#include <CGAL/interpolation_functions.h>

Inherits from

unary_function< Map::key_type, std::pair< Map::mapped_type, bool > >.

Definition

The struct Data_access implements a functor that allows to retrieve data from an associative container.

The functor keeps a reference to the container. Given an instance of the container's key type, it returns a pair of the container's value type and a Boolean indicating whether the retrieval was successful.

This class can be used to provide the values and gradients of the interpolation functions.

Parameters

The class Data_access has the container type Map as template parameter.

Examples:
Interpolation/linear_interpolation_2.cpp, and Interpolation/sibson_interpolation_2.cpp.

Types

typedef Map::mapped_type Data_type
 
typedef Map::key_type Key_type
 

Creation

 Data_access (const Map &map)
 Introduces a Data_access to the container map.
 
std::pair< Data_type, bool > operator() (const Key_type &p)
 If there is an entry for p in the container map, then the pair of map.find(p) and true is returned. More...
 

Member Function Documentation

template<typename Map >
std::pair< Data_type, bool> CGAL::Data_access< Map >::operator() ( const Key_type p)

If there is an entry for p in the container map, then the pair of map.find(p) and true is returned.

Otherwise, the Boolean value of the pair is false.