Files | |
| file | eg_eset.h |
Data Structures | |
| struct | EGes_t |
| this structure holds an element of a set More... | |
Defines | |
| #define | EG_ESET_DLEVEL 0 |
| #define | EGesFind(elem) |
| this function find the representant of this element in his equivalence set. | |
| #define | EGesInit(elem) |
| Initialize a set element as a set containing only itsself. | |
| #define | EGesLink(u, v) |
| Given two representing elements for two clases, joint them into a single class. | |
Typedefs | |
| typedef EGes_t | EGes_t |
| this structure holds an element of a set | |
|
|
|
|
|
Value: ({\
EGes_t *_EGesFc = elem, *_EGesFn;\
while(_EGesFc != _EGesFc->father)\
{\
_EGesFn = _EGesFc->father;\
_EGesFc->father = _EGesFn->father;\
_EGesFc = _EGesFn;\
}\
_EGesFc;})
|
|
|
Value: Initialize a set element as a set containing only itsself.
|
|
|
Value: ({\
EGes_t *_EGes_lu = (u), *_EGes_lv = (v);\
EXITL(EG_ESET_DLEVEL, _EGes_lu != _EGes_lu->father, #u\
" is not a representant for its class");\
EXITL(EG_ESET_DLEVEL, _EGes_lv != _EGes_lv->father, #v\
" is not a representant for its class");\
EXITL(EG_ESET_DLEVEL, _EGes_lu == _EGes_lv, "same representant v == u");\
if(_EGes_lu->rank <= _EGes_lv->rank) _EGes_lu->rank = _EGes_lv->rank+1;\
_EGes_lv->father = _EGes_lu;\
_EGes_lu;})
|
|
|
this structure holds an element of a set
|
1.4.5