CGAL 5.1.2 - 2D and Surface Function Interpolation
CGAL::Data_access< Map > Struct Template Reference

#include <CGAL/interpolation_functions.h>

Inherits from

CGAL::cpp98::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/interpolation_2.cpp, Interpolation/linear_interpolation_2.cpp, Interpolation/linear_interpolation_of_vector_3.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...
 

Additional Inherited Members

- Public Types inherited from CGAL::cpp98::unary_function< Map::key_type, std::pair< Map::mapped_type, bool > >
typedef ArgumentType argument_type
 
typedef ResultType result_type
 

Member Function Documentation

◆ operator()()

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.