H2Lib  3.0
dcluster.h
Go to the documentation of this file.
1 
2 /* ------------------------------------------------------------
3  * This is the file "dcluster.h" of the H2Lib package.
4  * All rights reserved, Steffen Boerm 2015
5  * ------------------------------------------------------------ */
6 
10 #ifndef DCLUSTER_H
11 #define DCLUSTER_H
12 
18 typedef struct _dcluster dcluster;
19 
22 
24 typedef const dcluster *pcdcluster;
25 
27 typedef struct _leveldir leveldir;
28 
31 
33 typedef const leveldir *pcleveldir;
34 
35 #include "settings.h"
36 #include "cluster.h"
37 #include <stdlib.h>
38 
40 struct _dcluster
41 {
44 
48 
51 
55 
58 
62 
66 
69 
76 
80 
83 };
84 
92 struct _leveldir
93 {
96 
99 
102 
105 
108 
112 
115 };
116 
117 /* ------------------------------------------------------------
118  * Constructors and destructors
119  * ------------------------------------------------------------ */
120 
130 
138 HEADER_PREFIX void
140 
144 HEADER_PREFIX void
146 
153 new_leveldir(uint depth, uint dim);
154 
158 HEADER_PREFIX void
160 
161 /* ------------------------------------------------------------
162  * Construction of dcluster trees
163  * ------------------------------------------------------------ */
164 
171 
172 /* ------------------------------------------------------------
173  * Bounding box
174  * ------------------------------------------------------------ */
175 
182 
192 
202 
203 /* ------------------------------------------------------------
204  * Match directions
205  * ------------------------------------------------------------ */
206 
217 
218 /* ------------------------------------------------------------
219  * Statistics
220  * ------------------------------------------------------------ */
221 
227 
232 HEADER_PREFIX size_t
234 
241 
250 
251 /* ------------------------------------------------------------
252  * Construct directions for clusters
253  * ------------------------------------------------------------ */
254 
271 
283 
286 #endif
uint depth
Depth of the cluster tree.
Definition: dcluster.h:95
Directional cluster tree.
Definition: dcluster.h:40
uint getalldirections_dcluster(pcdcluster t)
Compute the number of all directions for all clusters in a directional cluster tree.
const leveldir * pcleveldir
Pointer to constant leveldir object.
Definition: dcluster.h:33
real diam_dcluster(pcdcluster t)
Compute the diameter of the bounding box of a directional cluster.
preal ** dir
Directions, type real dir[depth][directions][dim]
Definition: dcluster.h:111
uint dim
Spatial dimension.
Definition: dcluster.h:98
size_t getsize_dcluster(pcdcluster t)
Compute the storage size of a directional cluster tree.
uint * splits
Splitting parameters.
Definition: dcluster.h:104
leveldir * pleveldir
Pointer to leveldir object.
Definition: dcluster.h:30
uint * idx
Index array, type uint idx[size]
Definition: dcluster.h:47
preal dirmem
Auxiliary storage.
Definition: dcluster.h:114
const dcluster * pcdcluster
Pointer to constant dcluster object.
Definition: dcluster.h:24
unsigned uint
Unsigned integer type.
Definition: settings.h:70
uint getactives_dcluster()
Get the number of active dcluster objects.
pdcluster * son
Pointers to sons, type pdcluster son[sons]
Definition: dcluster.h:54
uint finddirection_leveldir(pcleveldir ld, uint l, real alpha, pcreal d)
Find an index best matching on a given level of a directional cluster tree.
preal maxdiam
Diameter of largest cluster on this level.
Definition: dcluster.h:101
uint sons
Number of sons.
Definition: dcluster.h:50
void update_dcluster(pdcluster t)
Update a directional cluster.
uint size
Number of indices.
Definition: dcluster.h:43
real dist_dcluster(pcdcluster t, pcdcluster s)
Compute the distance of the bounding boxes of two directional clusters.
uint desc
Number of descendants in tree.
Definition: dcluster.h:82
pdcluster buildfromcluster_dcluster(pccluster t)
Construct a directional cluster tree.
pleveldir builddirections_box_dcluster(pdcluster t, real eta1)
Construct set of directions for a directional cluster tree by using a subdivision of an axis-parallel...
pleveldir new_leveldir(uint depth, uint dim)
Create directions for a cluster tree.
void del_dcluster(pdcluster t)
Delete a directional cluster tree.
#define HEADER_PREFIX
Prefix for function declarations.
Definition: settings.h:43
double real
real floating point type.
Definition: settings.h:97
real * bmax
Maximal coordinates of bounding boxes, type real bmax[dim]
Definition: dcluster.h:65
real * preal
Pointer to real array.
Definition: settings.h:145
uint getdepth_dcluster(pcdcluster t)
Compute the depth of a directional cluster tree.
uint finddirection_dcluster(pcdcluster t, real alpha, pcreal d)
Among the directions associated with a directional cluster, find the one that best matches ...
dcluster * pdcluster
Pointer to dcluster object.
Definition: dcluster.h:21
Families of directions for all levels of the cluster tree.
Definition: dcluster.h:92
real * bmin
Minimal coordinates of bounding boxes, type real bmin[dim]
Definition: dcluster.h:61
real middist_dcluster(pcdcluster t, pcdcluster s)
Compute the distance of the midpoints of the bounding boxes of two directional clusters.
pcreal * dir
Directions, type real dir[directions][dim]
Definition: dcluster.h:75
Representation of cluster trees.
Definition: cluster.h:40
uint ** dirson
Corresponding directions in sons, type uint dirson[sons][directions]
Definition: dcluster.h:79
pdcluster new_dcluster(uint size, uint *idx, uint sons, uint dim)
Create a new directional cluster.
void del_leveldir(pleveldir ld)
Delete directions.
uint dim
Dimension of bounding box.
Definition: dcluster.h:57
uint directions
Number of directions.
Definition: dcluster.h:68
const real * pcreal
Pointer to constant real array.
Definition: settings.h:148
uint * directions
Number of directions.
Definition: dcluster.h:107