Reference documentation for deal.II version 9.2.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\}}\)
Public Types | Public Member Functions | Public Attributes | List of all members
ExtractLevelVisitor< Value, Options, Translator, Box, Allocators > Struct Template Reference

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

Inheritance diagram for ExtractLevelVisitor< Value, Options, Translator, Box, Allocators >:
[legend]

Public Types

using InternalNode = typename boost::geometry::index::detail::rtree::internal_node< Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag >::type
 
using Leaf = typename boost::geometry::index::detail::rtree::leaf< Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag >::type
 

Public Member Functions

 ExtractLevelVisitor (Translator const &translator, const unsigned int target_level, std::vector< BoundingBox< boost::geometry::dimension< Box >::value >> &boxes)
 
void operator() (InternalNode const &node)
 
void operator() (Leaf const &)
 

Public Attributes

const Translator & translator
 
size_t level
 
const size_t target_level
 
std::vector< BoundingBox< boost::geometry::dimension< Box >::value > > & boxes
 

Detailed Description

template<typename Value, typename Options, typename Translator, typename Box, typename Allocators>
struct ExtractLevelVisitor< Value, Options, Translator, Box, Allocators >

Helper structure that allows one to extract a level from an RTree as a vector of BoundingBox objects.

This structure implements a boost::geometry::index::detail::rtree::visitor object, allowing one to visit any existing RTree object, and return the vector of bounding boxes associated to a specific target level of the tree.

Although possible, direct usage of this structure is cumbersome. The suggested usage of this class is through the helper function extract_rtree_level().

Author
Luca Heltai, 2020.

Definition at line 187 of file rtree.h.

Member Typedef Documentation

◆ InternalNode

template<typename Value , typename Options , typename Translator , typename Box , typename Allocators >
using ExtractLevelVisitor< Value, Options, Translator, Box, Allocators >::InternalNode = typename boost::geometry::index::detail::rtree::internal_node< Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag>::type

An alias that identifies an InternalNode of the tree.

Definition at line 214 of file rtree.h.

◆ Leaf

template<typename Value , typename Options , typename Translator , typename Box , typename Allocators >
using ExtractLevelVisitor< Value, Options, Translator, Box, Allocators >::Leaf = typename boost::geometry::index::detail::rtree::leaf< Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag>::type

An alias that identifies a Leaf of the tree.

Definition at line 224 of file rtree.h.

Constructor & Destructor Documentation

◆ ExtractLevelVisitor()

template<typename Value , typename Options , typename Translator , typename Box , typename Allocators >
ExtractLevelVisitor< Value, Options, Translator, Box, Allocators >::ExtractLevelVisitor ( Translator const &  translator,
const unsigned int  target_level,
std::vector< BoundingBox< boost::geometry::dimension< Box >::value >> &  boxes 
)
inline

Construct a vector boxes of BoundingBox objects corresponding to the target_level of the tree.

Member Function Documentation

◆ operator()() [1/2]

template<typename Value , typename Options , typename Translator , typename Box , typename Allocators >
void ExtractLevelVisitor< Value, Options, Translator, Box, Allocators >::operator() ( InternalNode const &  node)
inline

Implements the visitor interface for InternalNode objects. If the node belongs to the target_leve, then fill the bounding box vector.

◆ operator()() [2/2]

template<typename Value , typename Options , typename Translator , typename Box , typename Allocators >
void ExtractLevelVisitor< Value, Options, Translator, Box, Allocators >::operator() ( Leaf const &  )
inline

Implements the visitor interface for Leaf objects.

Member Data Documentation

◆ translator

template<typename Value , typename Options , typename Translator , typename Box , typename Allocators >
const Translator& ExtractLevelVisitor< Value, Options, Translator, Box, Allocators >::translator

Translator interface, required by the boost implementation of the rtree.

Definition at line 242 of file rtree.h.

◆ level

template<typename Value , typename Options , typename Translator , typename Box , typename Allocators >
size_t ExtractLevelVisitor< Value, Options, Translator, Box, Allocators >::level

Store the level we are currently visiting.

Definition at line 247 of file rtree.h.

◆ target_level

template<typename Value , typename Options , typename Translator , typename Box , typename Allocators >
const size_t ExtractLevelVisitor< Value, Options, Translator, Box, Allocators >::target_level

The level we want to extract from the RTree object.

Definition at line 252 of file rtree.h.

◆ boxes

template<typename Value , typename Options , typename Translator , typename Box , typename Allocators >
std::vector<BoundingBox<boost::geometry::dimension<Box>::value> >& ExtractLevelVisitor< Value, Options, Translator, Box, Allocators >::boxes

A reference to the input vector of BoundingBox objects.

Definition at line 257 of file rtree.h.


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