searchTree.h
Go to the documentation of this file.
1 
7 #ifndef __SEARCHTREE_H__
8 #define __SEARCHTREE_H__
9 
10 #include <vector>
11 using std::vector;
12 
13 #include "searchCache.h"
14 #include "ptpair.h"
15 #include "data_types.h"
16 
22 class Tree {
23 public:
28  virtual inline ~Tree() {};
29 };
30 
31 
32 class Scan;
39 class SearchTree : public Tree {
40  friend class Scan;
41 public:
45  inline SearchTree() {};
46 
53  SearchTree(double **pts, int n);
54 
59  virtual inline ~SearchTree() {};
60 
64  virtual inline void lock() {};
65 
69  virtual inline void unlock() {};
70 
81  virtual double *FindClosest(double *_p, double maxdist2, int threadNum = 0) const = 0 ;
82 
83  virtual void getPtPairs(vector <PtPair> *pairs,
84  double *source_alignxf,
85  double * const *q_points, unsigned int startindex, unsigned int endindex,
86  int thread_num,
87  int rnd, double max_dist_match2, double &sum,
88  double *centroid_m, double *centroid_d);
89 
90  virtual void getPtPairs(vector <PtPair> *pairs,
91  double *source_alignxf,
92  const DataXYZ& xyz_r, unsigned int startindex, unsigned int endindex,
93  int thread_num,
94  int rnd, double max_dist_match2, double &sum,
95  double *centroid_m, double *centroid_d);
96 };
97 
98 
105 class CachedSearchTree : public SearchTree {
106 public:
110  inline CachedSearchTree() {};
111 
118  CachedSearchTree(double **pts, int n, CachedSearchTree *_parent = 0);
119 
124  virtual inline ~CachedSearchTree() {};
125 
136  virtual SearchTreeCacheItem* FindClosestCacheInit(double *_p, double maxdist2, int threadNum = 0) = 0;
137 
148  virtual SearchTreeCacheItem* FindClosestCache(double *_p, double maxdist2, int threadNum = 0) = 0;
149  double *FindClosest(double *_p, double maxdist2, int threadNum = 0) const {
150  return 0;
151  }
152 };
153 
154 
155 #endif
CachedSearchTree::~CachedSearchTree
virtual ~CachedSearchTree()
Definition: searchTree.h:124
data_types.h
Basic DataPointer class and its derivates SingleArray and TripleArray.
Tree
The tree structure.
Definition: searchTree.h:22
SearchTree::~SearchTree
virtual ~SearchTree()
Definition: searchTree.h:59
SearchTree::FindClosest
virtual double * FindClosest(double *_p, double maxdist2, int threadNum=0) const =0
CachedSearchTree::FindClosest
double * FindClosest(double *_p, double maxdist2, int threadNum=0) const
Definition: searchTree.h:149
SearchTree::lock
virtual void lock()
Definition: searchTree.h:64
SearchTree::Scan
friend class Scan
Definition: searchTree.h:40
SearchTreeCacheItem
The general Cache Item.
Definition: searchCache.h:15
CachedSearchTree::FindClosestCacheInit
virtual SearchTreeCacheItem * FindClosestCacheInit(double *_p, double maxdist2, int threadNum=0)=0
searchCache.h
Representation of a general cache for search trees.
SearchTree::getPtPairs
virtual void getPtPairs(vector< PtPair > *pairs, double *source_alignxf, double *const *q_points, unsigned int startindex, unsigned int endindex, int thread_num, int rnd, double max_dist_match2, double &sum, double *centroid_m, double *centroid_d)
Definition: searchTree.cc:20
SearchTree::unlock
virtual void unlock()
Definition: searchTree.h:69
Tree::~Tree
virtual ~Tree()
Definition: searchTree.h:28
CachedSearchTree::CachedSearchTree
CachedSearchTree()
Definition: searchTree.h:110
SearchTree::SearchTree
SearchTree()
Definition: searchTree.h:45
CachedSearchTree
The search tree structure.
Definition: searchTree.h:105
CachedSearchTree::FindClosestCache
virtual SearchTreeCacheItem * FindClosestCache(double *_p, double maxdist2, int threadNum=0)=0
SearchTree
The search tree structure.
Definition: searchTree.h:39
ptpair.h
Definition of point pairs.
TripleArray
Definition: data_types.h:135


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:25