deal.II version GIT relicensing-2167-g9622207b8f 2024-11-21 12:40:00+00:00
\(\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
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 >:
Inheritance graph
[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 (const Translator &translator, const unsigned int target_level, std::vector< BoundingBox< boost::geometry::dimension< Box >::value > > &boxes)
 
void operator() (const InternalNode &node)
 
void operator() (const Leaf &)
 

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().

Definition at line 324 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 345 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 356 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 ( const Translator &  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() ( const InternalNode node)
inline

Implements the visitor interface for InternalNode objects. If the node belongs to the target_level, 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() ( const Leaf )
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 379 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 384 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 389 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 394 of file rtree.h.


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