H2Lib  3.0
Data Structures | Typedefs | Functions
dblock

Directional block tree. More...

Data Structures

struct  _dblock
 Directional block tree. More...
 
struct  _diradmdata
 Data for directional admissibility condition. More...
 

Typedefs

typedef struct _dblock dblock
 Directional block tree.
 
typedef dblockpdblock
 Pointer to dblock.
 
typedef const dblockpcdblock
 Pointer to constant dblock.
 
typedef struct _diradmdata diradmdata
 Data for directional admissibility condition.
 
typedef diradmdatapdiradmdata
 Pointer to diradmdata.
 
typedef const diradmdatapcdiradmdata
 Pointer to constant diradmdata.
 

Functions

pdblock new_dblock (pdcluster rc, pdcluster cc, uint rd, uint cd, uint rsons, uint csons)
 Create a new directional block. More...
 
void update_dblock (pdblock b)
 Update a directional block. More...
 
void del_dblock (pdblock b)
 Delete a directional block tree. More...
 
uint getactives_dblock ()
 Obtain the number of currently active directional blocks. More...
 
size_t getsize_dblock (pcdblock b)
 Compute the storage size of a directional block tree. More...
 
uint getdepth_dblock (pcdblock b)
 Compute the depth of a directional block tree. More...
 
void cairodraw_dblock (cairo_t *cr, pcdblock b, int levels)
 Draw a directional block tree. More...
 
pdblock build_dblock (pdcluster rc, pdcluster cc, uint l, bool(*admissible)(pdcluster rc, pdcluster cc, uint l, uint *rd, uint *cd, void *data), void *data)
 Build a directional block tree. More...
 
bool parabolic_admissibility (pdcluster rc, pdcluster cc, uint l, uint *rd, uint *cd, void *data)
 Parabolic admissibility condition. More...
 
bool standard_admissibility (pdcluster rc, pdcluster cc, uint l, uint *rd, uint *cd, void *data)
 Standard admissibility condition. More...
 
real getmaxeta_dblock (pcdblock b)
 Compute the maximum of $\diam(t)/\dist(t,s)$ and $\diam(s)/\diam(t,s)$ for all admissible blocks. More...
 
pleveldir remove_unused_direction (pdblock b, pdcluster t, pleveldir lold)
 Remove unused directions and set up new leveldir object. More...
 
pdblockenumerate_dblock (pdblock b)
 Enumerates a directional block tree. More...
 

Detailed Description

Directional block tree.

Function Documentation

pdblock build_dblock ( pdcluster  rc,
pdcluster  cc,
uint  l,
bool(*)(pdcluster rc, pdcluster cc, uint l, uint *rd, uint *cd, void *data)  admissible,
void *  data 
)

Build a directional block tree.

Parameters
rcRoot row cluster.
ccRoot column cluster.
lRoot level (for accessing leveldir structures.
admissibleAdmissibility condition.
dataData for admissibility condition.
Returns
New directional block tree.
void cairodraw_dblock ( cairo_t *  cr,
pcdblock  b,
int  levels 
)

Draw a directional block tree.

Parameters
crCairo context for drawing.
bDirectional block tree.
levelsNumber of levels to be drawn. Zero means that all levels are drawn.
void del_dblock ( pdblock  b)

Delete a directional block tree.

Parameters
bDirectional block tree to be delete.
pdblock* enumerate_dblock ( pdblock  b)

Enumerates a directional block tree.

Enumerates a dblock object b in an array of size $ b->desc $. Runs through all descendants and orders them in pointer to a direction block tree.

Parameters
bdblock object to be enumerated.
Returns
Returns a pointer to a dblock object with enumerated descendants and length of $ b->desc $.
uint getactives_dblock ( )

Obtain the number of currently active directional blocks.

Returns
Number of currently active directional blocks.
uint getdepth_dblock ( pcdblock  b)

Compute the depth of a directional block tree.

Parameters
bDirectional block tree.
Returns
Depth of the directional block tree.
real getmaxeta_dblock ( pcdblock  b)

Compute the maximum of $\diam(t)/\dist(t,s)$ and $\diam(s)/\diam(t,s)$ for all admissible blocks.

Parameters
bDirectional block.
Returns
Effective admissibility parameter $\eta$.
size_t getsize_dblock ( pcdblock  b)

Compute the storage size of a directional block tree.

Parameters
bDirectional block tree.
Returns
Storage size of the directional block tree with root b.
pdblock new_dblock ( pdcluster  rc,
pdcluster  cc,
uint  rd,
uint  cd,
uint  rsons,
uint  csons 
)

Create a new directional block.

Parameters
rcRow cluster.
ccColumn cluster.
rdRow direction.
cdColumn direction.
rsonsNumber of row sons.
csonsNumber of column sons.
Returns
New directional block.
bool parabolic_admissibility ( pdcluster  rc,
pdcluster  cc,
uint  l,
uint rd,
uint cd,
void *  data 
)

Parabolic admissibility condition.

A pair of clusters $(t,s)$ is considered admissible if $\kappa \diam^2(B_t) \leq \eta_2 \dist(B_t,B_s)$, $\kappa \diam^2(B_s) \leq \eta_2 \dist(B_t,B_s)$, $\diam(B_t) \leq \eta_2 \dist(B_t,B_s)$, and $\diam(B_s) \leq \eta_2 \dist(B_t,B_s)$, where $B_t$ and $B_s$ are the bounding boxes of the two clusters.

Parameters
rcRow cluster $t$.
ccColumn cluster $s$.
lLevel.
rdPointer to where the row direction will be stored.
cdPointer to where the column direction will be stored.
dataAdditional data, has to be a pointer to an diradmdata object.
Returns
True if $(t,s)$ is admissible.
pleveldir remove_unused_direction ( pdblock  b,
pdcluster  t,
pleveldir  lold 
)

Remove unused directions and set up new leveldir object.

Search all used directions and collect them in a new leveldir object. After that the directional cluster and block trees will be updated.

Attention
During this routine the leveldir lold will be destroyed.
Parameters
bRoot of the directional block tree.
tRoot of the directional cluster tree which belongs to b .
loldLeveldir object which belongs to t .
Returns
New leveldir object which is now used for t .
bool standard_admissibility ( pdcluster  rc,
pdcluster  cc,
uint  l,
uint rd,
uint cd,
void *  data 
)

Standard admissibility condition.

A pair of clusters $(t,s)$ is considered admissible if $\diam(B_t) \leq \eta_2 \dist(B_t,B_s)$, and $\diam(B_s) \leq \eta_2 \dist(B_t,B_s)$, where $B_t$ and $B_s$ are the bounding boxes of the two clusters.

Parameters
rcRow cluster $t$.
ccColumn cluster $s$.
lLevel.
rdPointer to where the row direction will be stored.
cdPointer to where the column direction will be stored.
dataAdditional data, has to be a pointer to an diradmdata object.
Returns
True if $(t,s)$ is admissible.
void update_dblock ( pdblock  b)

Update a directional block.

This function has to be called after changing the sons of a directional block, e.g., to update the desc field in the current block.

Parameters
bDirectional block to be updated.