Reference documentation for deal.II version 9.6.0
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
IndexableGetterFromIndices< Container > Class Template Reference

#include <deal.II/numerics/rtree.h>

Public Types

using IndexableGetter
 
using result_type = typename IndexableGetter::result_type
 
using size_t = typename Container::size_type
 

Public Member Functions

 IndexableGetterFromIndices (const Container &c)
 
result_type operator() (size_t i) const
 

Private Attributes

const Container & container
 
IndexableGetter getter
 

Detailed Description

template<typename Container>
class IndexableGetterFromIndices< Container >

A class that may be used as an IndexableGetter template argument for an RTree that stores indices to entries in a Container type.

This class may be used as a proxy to extract an indexable type from compatible containers. For example:

std::vector<std::pair<Point<dim>, double> > point_temperature = fill();
IndexableGetterFromIndices<decltype(point_temperature)>
getter(point_temperature);
const Point<dim> &p = getter(i); // returns point_temperature[i].first;
IndexableGetter getter
Definition rtree.h:243
Definition point.h:111

This class is used by the pack_rtree_of_indices() function to construct an RTree where the leaves are indices pointing to the entries of the container passed to this class.

Definition at line 197 of file rtree.h.

Member Typedef Documentation

◆ IndexableGetter

template<typename Container >
using IndexableGetterFromIndices< Container >::IndexableGetter
Initial value:

An alias for the boost type that is used to extract a Point, Segment, or BoundingBox from compatible types (pairs, tuples, etc.).

Definition at line 204 of file rtree.h.

◆ result_type

template<typename Container >
using IndexableGetterFromIndices< Container >::result_type = typename IndexableGetter::result_type

An alias to the actual geometrical type.

Definition at line 210 of file rtree.h.

◆ size_t

template<typename Container >
using IndexableGetterFromIndices< Container >::size_t = typename Container::size_type

An alias to the index type.

Definition at line 215 of file rtree.h.

Constructor & Destructor Documentation

◆ IndexableGetterFromIndices()

template<typename Container >
IndexableGetterFromIndices< Container >::IndexableGetterFromIndices ( const Container & c)
inlineexplicit

Constructor. Store a const reference to a container.

Definition at line 220 of file rtree.h.

Member Function Documentation

◆ operator()()

template<typename Container >
result_type IndexableGetterFromIndices< Container >::operator() ( size_t i) const
inline

Implements the IndexableGetter requirements of the rtree class.

Definition at line 228 of file rtree.h.

Member Data Documentation

◆ container

template<typename Container >
const Container& IndexableGetterFromIndices< Container >::container
private

A const reference to the container.

Definition at line 237 of file rtree.h.

◆ getter

template<typename Container >
IndexableGetter IndexableGetterFromIndices< Container >::getter
private

An instantiation of the getter that allows easy translation from the container value_type and the actual indexable type.

Definition at line 243 of file rtree.h.


The documentation for this class was generated from the following file: