NiHu  2.0
NiHu::fmm::cluster_tree< ClusterDerived > Class Template Reference

Class representing a cluster tree. More...

#include <cluster_tree.hpp>

Public Types

typedef ClusterDerived cluster_t
 
typedef cluster_t::bounding_box_t bounding_box_t
 
typedef cluster_t::location_t location_t
 
typedef cluster_t::idx_list_t idx_list_t
 
typedef std::vector< cluster_t, Eigen::aligned_allocator< cluster_t > > cluster_vector_t
 Type of the cluster vector.
 
typedef cluster_vector_t::const_iterator iterator_t
 

Public Member Functions

template<class It , class DivideDerived >
 cluster_tree (It src_begin, It src_end, divide_base< DivideDerived > const &divide)
 Create a cluster tree. More...
 
template<class It1 , class It2 , class DivideDerived >
 cluster_tree (It1 src_begin, It1 src_end, It2 rec_begin, It2 rec_end, divide_base< DivideDerived > const &divide)
 Create a cluster tree. More...
 
size_t get_n_src_nodes () const
 
size_t get_n_rec_nodes () const
 
const std::vector< size_t > & get_leaf_indices () const
 return vector of leaf cluster indices More...
 
const std::vector< size_t > & get_leaf_src_indices () const
 
const std::vector< size_t > & get_leaf_rec_indices () const
 
size_t get_n_leaves () const
 return number of leaf clusters More...
 
std::vector< idx_list_t > get_leaf_src_index_vectors () const
 assemble and return source leaf index vectors More...
 
const cluster_t & operator[] (size_t idx) const
 index operator returning the idx-th cluster More...
 
cluster_t & operator[] (size_t idx)
 index operator returning the idx-th cluster More...
 
double get_root_diameter () const
 return root bounding box diameter More...
 
size_t get_n_levels () const
 return number of levels More...
 
size_t level_begin (size_t idx) const
 Begin iterator to idx-th level clusters. More...
 
size_t level_end (size_t idx) const
 End iterator to idx-th level clusters. More...
 
size_t get_n_clusters () const
 return number of clusters More...
 
iterator_t begin () const
 
iterator_t end () const
 
void print_debug (std::ostream &os=std::cout) const
 Print debug information to output strean. More...
 
idx_list_t get_src_ids () const
 
const idx_list_t & get_rec_ids () const
 

Static Public Attributes

static const size_t dimension = cluster_t::dimension
 

Detailed Description

template<class ClusterDerived>
class NiHu::fmm::cluster_tree< ClusterDerived >

Class representing a cluster tree.

Template Parameters
DimSpace dimension

Definition at line 33 of file cluster_tree.hpp.

Constructor & Destructor Documentation

◆ cluster_tree() [1/2]

template<class ClusterDerived >
template<class It , class DivideDerived >
NiHu::fmm::cluster_tree< ClusterDerived >::cluster_tree ( It  src_begin,
It  src_end,
divide_base< DivideDerived > const &  divide 
)
inline

Create a cluster tree.

Template Parameters
ItIterator type
DivideDerivedCluster division method
Parameters
[in]src_beginBegin iterator to sources / receivers
[in]src_endEnd iterator to sources / receivers

Definition at line 59 of file cluster_tree.hpp.

◆ cluster_tree() [2/2]

template<class ClusterDerived >
template<class It1 , class It2 , class DivideDerived >
NiHu::fmm::cluster_tree< ClusterDerived >::cluster_tree ( It1  src_begin,
It1  src_end,
It2  rec_begin,
It2  rec_end,
divide_base< DivideDerived > const &  divide 
)
inline

Create a cluster tree.

Template Parameters
It1Source iterator type
It2Receiver iterator type
DivideDerivedCluster division method
Parameters
[in]src_beginBegin iterator to sources
[in]src_endEnd iterator to sources
[in]rec_beginBegin iterator to receivers
[in]rec_endEnd iterator to receivers

Definition at line 75 of file cluster_tree.hpp.

Member Function Documentation

◆ get_leaf_indices()

template<class ClusterDerived >
const std::vector<size_t>& NiHu::fmm::cluster_tree< ClusterDerived >::get_leaf_indices ( ) const
inline

return vector of leaf cluster indices

Returns
vector of leaf cluster indices

Definition at line 189 of file cluster_tree.hpp.

◆ get_leaf_src_index_vectors()

template<class ClusterDerived >
std::vector<idx_list_t> NiHu::fmm::cluster_tree< ClusterDerived >::get_leaf_src_index_vectors ( ) const
inline

assemble and return source leaf index vectors

Returns
vector of vectors containing leaf source indices

Definition at line 215 of file cluster_tree.hpp.

◆ get_n_clusters()

template<class ClusterDerived >
size_t NiHu::fmm::cluster_tree< ClusterDerived >::get_n_clusters ( ) const
inline

return number of clusters

Returns
number of clusters

Definition at line 282 of file cluster_tree.hpp.

◆ get_n_leaves()

template<class ClusterDerived >
size_t NiHu::fmm::cluster_tree< ClusterDerived >::get_n_leaves ( ) const
inline

return number of leaf clusters

Returns
number of leaf clusters

Definition at line 207 of file cluster_tree.hpp.

◆ get_n_levels()

template<class ClusterDerived >
size_t NiHu::fmm::cluster_tree< ClusterDerived >::get_n_levels ( ) const
inline

return number of levels

Returns
number of levels. If the tree is numbered from 0 to 5 then 6 is returned.

Definition at line 253 of file cluster_tree.hpp.

◆ get_root_diameter()

template<class ClusterDerived >
double NiHu::fmm::cluster_tree< ClusterDerived >::get_root_diameter ( ) const
inline

return root bounding box diameter

Returns
root bounding box diameter

Definition at line 245 of file cluster_tree.hpp.

◆ level_begin()

template<class ClusterDerived >
size_t NiHu::fmm::cluster_tree< ClusterDerived >::level_begin ( size_t  idx) const
inline

Begin iterator to idx-th level clusters.

Parameters
[in]idxthe level index
Returns
begin index of idx-th level clusters

Definition at line 264 of file cluster_tree.hpp.

◆ level_end()

template<class ClusterDerived >
size_t NiHu::fmm::cluster_tree< ClusterDerived >::level_end ( size_t  idx) const
inline

End iterator to idx-th level clusters.

Parameters
[in]idxthe level index
Returns
end index of idx-th level clusters

Definition at line 274 of file cluster_tree.hpp.

◆ operator[]() [1/2]

template<class ClusterDerived >
cluster_t& NiHu::fmm::cluster_tree< ClusterDerived >::operator[] ( size_t  idx)
inline

index operator returning the idx-th cluster

Parameters
[in]idxthe cluster index
Returns
the idx-th cluster

Definition at line 237 of file cluster_tree.hpp.

◆ operator[]() [2/2]

template<class ClusterDerived >
const cluster_t& NiHu::fmm::cluster_tree< ClusterDerived >::operator[] ( size_t  idx) const
inline

index operator returning the idx-th cluster

Parameters
[in]idxthe cluster index
Returns
the idx-th cluster

Definition at line 228 of file cluster_tree.hpp.

◆ print_debug()

template<class ClusterDerived >
void NiHu::fmm::cluster_tree< ClusterDerived >::print_debug ( std::ostream &  os = std::cout) const
inline

Print debug information to output strean.

Parameters
[in]osOutput stream

Definition at line 301 of file cluster_tree.hpp.


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