![]() |
H2Lib
3.0
|
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 dblock * | pdblock |
Pointer to dblock. | |
typedef const dblock * | pcdblock |
Pointer to constant dblock. | |
typedef struct _diradmdata | diradmdata |
Data for directional admissibility condition. | |
typedef diradmdata * | pdiradmdata |
Pointer to diradmdata. | |
typedef const diradmdata * | pcdiradmdata |
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 ![]() ![]() | |
pleveldir | remove_unused_direction (pdblock b, pdcluster t, pleveldir lold) |
Remove unused directions and set up new leveldir object. More... | |
pdblock * | enumerate_dblock (pdblock b) |
Enumerates a directional block tree. More... | |
Directional block tree.
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.
rc | Root row cluster. |
cc | Root column cluster. |
l | Root level (for accessing leveldir structures. |
admissible | Admissibility condition. |
data | Data for admissibility condition. |
void cairodraw_dblock | ( | cairo_t * | cr, |
pcdblock | b, | ||
int | levels | ||
) |
Draw a directional block tree.
cr | Cairo context for drawing. |
b | Directional block tree. |
levels | Number of levels to be drawn. Zero means that all levels are drawn. |
void del_dblock | ( | pdblock | b | ) |
Delete a directional block tree.
b | Directional block tree to be delete. |
Enumerates a directional block tree.
Enumerates a dblock object b
in an array of size . Runs through all descendants and orders them in pointer to a direction block tree.
b | dblock object to be enumerated. |
uint getactives_dblock | ( | ) |
Obtain the number of currently active directional blocks.
Compute the depth of a directional block tree.
b | Directional block tree. |
Compute the maximum of and
for all admissible blocks.
b | Directional block. |
size_t getsize_dblock | ( | pcdblock | b | ) |
Compute the storage size of a directional block tree.
b | Directional block tree. |
b
. Create a new directional block.
rc | Row cluster. |
cc | Column cluster. |
rd | Row direction. |
cd | Column direction. |
rsons | Number of row sons. |
csons | Number of column sons. |
bool parabolic_admissibility | ( | pdcluster | rc, |
pdcluster | cc, | ||
uint | l, | ||
uint * | rd, | ||
uint * | cd, | ||
void * | data | ||
) |
Parabolic admissibility condition.
A pair of clusters is considered admissible if
,
,
, and
, where
and
are the bounding boxes of the two clusters.
rc | Row cluster ![]() |
cc | Column cluster ![]() |
l | Level. |
rd | Pointer to where the row direction will be stored. |
cd | Pointer to where the column direction will be stored. |
data | Additional data, has to be a pointer to an diradmdata object. |
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.
lold
will be destroyed.b | Root of the directional block tree. |
t | Root of the directional cluster tree which belongs to b . |
lold | Leveldir object which belongs to t . |
t
. bool standard_admissibility | ( | pdcluster | rc, |
pdcluster | cc, | ||
uint | l, | ||
uint * | rd, | ||
uint * | cd, | ||
void * | data | ||
) |
Standard admissibility condition.
A pair of clusters is considered admissible if
, and
, where
and
are the bounding boxes of the two clusters.
rc | Row cluster ![]() |
cc | Column cluster ![]() |
l | Level. |
rd | Pointer to where the row direction will be stored. |
cd | Pointer to where the column direction will be stored. |
data | Additional data, has to be a pointer to an diradmdata object. |
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.
b | Directional block to be updated. |