H2Lib  3.0
Data Structures | Typedefs | Functions
dcluster

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 dclusterpdcluster
 Pointer to dcluster object.
 
typedef const dclusterpcdcluster
 Pointer to constant dcluster object.
 
typedef struct _leveldir leveldir
 Directions for all levels of a directional cluster tree.
 
typedef leveldirpleveldir
 Pointer to leveldir object.
 
typedef const leveldirpcleveldir
 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 $\alpha d$. 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 $\alpha d$ on a given level of a directional cluster tree. More...
 

Detailed Description

Directional cluster trees.

Function Documentation

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.

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 $[-1,1]^3$ into sufficiently small boxes and projecting their centers to the unit sphere.

Parameters
tRoot of the directional cluster tree.
eta1Directional admissibility parameter $\eta_1$. The smaller $\eta_1$ is, the more directions are created.
Returns
Directions for all levels of the cluster tree.
pdcluster buildfromcluster_dcluster ( pccluster  t)

Construct a directional cluster tree.

Parameters
tRoot of a standard cluster tree.
Returns
New directional cluster tree.
void del_dcluster ( pdcluster  t)

Delete a directional cluster tree.

Parameters
tRoot of the directional cluster tree to be deleted.
void del_leveldir ( pleveldir  ld)

Delete directions.

Parameters
ldDirections to be deleted.
real diam_dcluster ( pcdcluster  t)

Compute the diameter of the bounding box of a directional cluster.

Parameters
tDirectional cluster $t$.
Returns
Euclidean diameter of the bounding box $B_t$.
real dist_dcluster ( pcdcluster  t,
pcdcluster  s 
)

Compute the distance of the bounding boxes of two directional clusters.

Parameters
tDirectional cluster $t$.
sDirectional cluster $s$.
Returns
Euclidean distance of the bounding boxes $B_t$ and $B_s$.
uint finddirection_dcluster ( pcdcluster  t,
real  alpha,
pcreal  d 
)

Among the directions associated with a directional cluster, find the one that best matches $\alpha d$.

Parameters
tDirectional cluster.
alphaScaling factor $\alpha$.
dDirection vector $d$.
Returns
Index of the direction associated with $t$ that best matches $\alpha d$.
uint finddirection_leveldir ( pcleveldir  ld,
uint  l,
real  alpha,
pcreal  d 
)

Find an index best matching $\alpha d$ on a given level of a directional cluster tree.

Parameters
ldDirections for all levels.
lLevel.
alphaScaling factor $\alpha$.
dDirection vector $d$.
Returns
Index of direction best matching $\alpha d$ on level l of the cluster tree.
uint getactives_dcluster ( )

Get the number of active dcluster objects.

Returns
Number of currently active dcluster objects.
uint getalldirections_dcluster ( pcdcluster  t)

Compute the number of all directions for all clusters in a directional cluster tree.

Parameters
tRoot of the directional cluster tree.
Returns
Sum of the number of directions for all clusters in the tree.
uint getdepth_dcluster ( pcdcluster  t)

Compute the depth of a directional cluster tree.

Parameters
tRoot of the directional cluster tree.
Returns
Depth of the directional cluster tree.
size_t getsize_dcluster ( pcdcluster  t)

Compute the storage size of a directional cluster tree.

Parameters
tRoot of the directional cluster tree.
Returns
Storage size 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.

Parameters
tDirectional cluster $t$.
sDirectional cluster $s$.
Returns
Euclidean distance of the midpoints of the bounding boxes $B_t$ and $B_s$.
pdcluster new_dcluster ( uint  size,
uint idx,
uint  sons,
uint  dim 
)

Create a new directional cluster.

Parameters
sizeNumber of indices.
idxArray of indices.
sonsNumber of sons.
dimSpatial dimension (e.g., of the bounding box).
Returns
New directional cluster.
pleveldir new_leveldir ( uint  depth,
uint  dim 
)

Create directions for a cluster tree.

Parameters
depthDepth of the cluster tree.
dimSpatial dimension.
Returns
Pointer to new leveldir object.
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.

Parameters
tCluster to be updated.