H2Lib
3.0
|
Directional cluster trees. More...
Data Structures | |
struct | _dcluster |
Directional cluster tree. More... | |
struct | _leveldir |
Families of directions for all levels of the cluster tree. More... | |
Typedefs | |
typedef struct _dcluster | dcluster |
Directional cluster tree. | |
typedef dcluster * | pdcluster |
Pointer to dcluster object. | |
typedef const dcluster * | pcdcluster |
Pointer to constant dcluster object. | |
typedef struct _leveldir | leveldir |
Directions for all levels of a directional cluster tree. | |
typedef leveldir * | pleveldir |
Pointer to leveldir object. | |
typedef const leveldir * | pcleveldir |
Pointer to constant leveldir object. | |
Functions | |
pdcluster | new_dcluster (uint size, uint *idx, uint sons, uint dim) |
Create a new directional cluster. More... | |
void | update_dcluster (pdcluster t) |
Update a directional cluster. More... | |
void | del_dcluster (pdcluster t) |
Delete a directional cluster tree. More... | |
pleveldir | new_leveldir (uint depth, uint dim) |
Create directions for a cluster tree. More... | |
void | del_leveldir (pleveldir ld) |
Delete directions. More... | |
pdcluster | buildfromcluster_dcluster (pccluster t) |
Construct a directional cluster tree. More... | |
real | diam_dcluster (pcdcluster t) |
Compute the diameter of the bounding box of a directional cluster. More... | |
real | dist_dcluster (pcdcluster t, pcdcluster s) |
Compute the distance of the bounding boxes of two directional clusters. More... | |
real | middist_dcluster (pcdcluster t, pcdcluster s) |
Compute the distance of the midpoints of the bounding boxes of two directional clusters. More... | |
uint | finddirection_dcluster (pcdcluster t, real alpha, pcreal d) |
Among the directions associated with a directional cluster, find the one that best matches . More... | |
uint | getactives_dcluster () |
Get the number of active dcluster objects. More... | |
size_t | getsize_dcluster (pcdcluster t) |
Compute the storage size of a directional cluster tree. More... | |
uint | getdepth_dcluster (pcdcluster t) |
Compute the depth of a directional cluster tree. More... | |
uint | getalldirections_dcluster (pcdcluster t) |
Compute the number of all directions for all clusters in a directional cluster tree. More... | |
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 box. More... | |
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. More... | |
Directional cluster trees.
Construct set of directions for a directional cluster tree by using a subdivision of an axis-parallel box.
The function computes the maximal diameters of clusters on each level of the directional cluster tree. Then the directions for each level are constructed by subdividing the surface of the cube into sufficiently small boxes and projecting their centers to the unit sphere.
t | Root of the directional cluster tree. |
eta1 | Directional admissibility parameter . The smaller is, the more directions are created. |
Construct a directional cluster tree.
t | Root of a standard cluster tree. |
void del_dcluster | ( | pdcluster | t | ) |
Delete a directional cluster tree.
t | Root of the directional cluster tree to be deleted. |
void del_leveldir | ( | pleveldir | ld | ) |
Delete directions.
ld | Directions to be deleted. |
real diam_dcluster | ( | pcdcluster | t | ) |
Compute the diameter of the bounding box of a directional cluster.
t | Directional cluster . |
real dist_dcluster | ( | pcdcluster | t, |
pcdcluster | s | ||
) |
Compute the distance of the bounding boxes of two directional clusters.
t | Directional cluster . |
s | Directional cluster . |
uint finddirection_dcluster | ( | pcdcluster | t, |
real | alpha, | ||
pcreal | d | ||
) |
Among the directions associated with a directional cluster, find the one that best matches .
t | Directional cluster. |
alpha | Scaling factor . |
d | Direction vector . |
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.
ld | Directions for all levels. |
l | Level. |
alpha | Scaling factor . |
d | Direction vector . |
l
of the cluster tree. uint getactives_dcluster | ( | ) |
uint getalldirections_dcluster | ( | pcdcluster | t | ) |
Compute the number of all directions for all clusters in a directional cluster tree.
t | Root of the directional cluster tree. |
uint getdepth_dcluster | ( | pcdcluster | t | ) |
Compute the depth of a directional cluster tree.
t | Root of the directional cluster tree. |
size_t getsize_dcluster | ( | pcdcluster | t | ) |
Compute the storage size of a directional cluster tree.
t | Root of the directional cluster tree. |
real middist_dcluster | ( | pcdcluster | t, |
pcdcluster | s | ||
) |
Compute the distance of the midpoints of the bounding boxes of two directional clusters.
t | Directional cluster . |
s | Directional cluster . |
Create a new directional cluster.
size | Number of indices. |
idx | Array of indices. |
sons | Number of sons. |
dim | Spatial dimension (e.g., of the bounding box). |
Create directions for a cluster tree.
depth | Depth of the cluster tree. |
dim | Spatial dimension. |
void update_dcluster | ( | pdcluster | t | ) |
Update a directional cluster.
This function is called after the sons of a cluster have been created or changed, e.g., to compute the number of descendants desc
.
t | Cluster to be updated. |