
Заготовки по С / Динамические структуры / GDSL / Документация
.pdf
5.1 _gdsl |
bintree.h File Refer n e |
|
|
197 |
||||
ˆ void |
gdsl_bintree_set |
left ( |
gdsl_bintree_t T, onst _gdsl_- |
|
||||
bintree t L) |
|
|
|
|
|
|
|
|
Set left sub-tree of a low-level binary tree. |
onst _- |
|||||||
ˆ void |
_gdsl bin |
|
set |
right |
( gdsl_bintree_t T, |
|||
gdsl_bintree t R) |
|
|
|
|
|
|
||
Set right sub-tre |
of a low-level binary tr . |
|
|
|||||
ˆ _gdsl_bintree_treegdsl |
bin |
_rotate_left (_gdsl_bintree_t |
||||||
ˆ bintreeT)gdslLeft_rotatebinotatreea low-tlevel binarygdsltretreebintree. |
_rotate_right |
(_gdsl_- |
||||||
ˆ bintreegdslRight_rightbin T)a lowt-levelgdslbinarybinarytretree._rotate_left_right |
(_gdsl_- |
|||||||
ˆ bintreegdslLeft_bin T)otate_at low-level_ |
e. rotate_right_left |
(_gdsl_- |
ˆbintreegdslRight-binleft treeT)otate, _onsta low-gdsllevelgdsl_binarytreee. _mapmap__prefunx_( onstMAP_F,gdslvoid-
ˆbintreeUSERgdslParse_binDAatlowtreeTA)-,l velonstbinarygdsltree__ pretreexed__ordermap.__infunx _( onstMAP_F,gdslvoid-
ˆbintreeUSERgdslParse_binDAatlowtreeTA)-,l velonstbinarygdslgdsltree__binbintreeintreexed ordermapmap.__postfun x_t( onstMAP_F,gdslvoid-
ˆgdslUSERParsebintreegdslDAa lowTontentA)-binlevelwrbinaryiteee writefuntr _( postonstWRITExed gdslorderF,. FILEbintree_t T, onst _-
OUTPUT_FILE,
ˆ _gdslWriteUSERgdslbintreethe bintreeDATA)writeof allwritenodfuns ofxmlta WRITElow( -onstlevel_binaryF,gdslFILEbintreeto a le.t T, onst
void OUTPUT_FILE,
Generated onUSERThu JunDATA)22 11:15:30 2006 for gdsl by Doxygen

198 |
Write the |
|
gdsl File Do umentation |
||
|
of a low-level binary tree to a le into XML. |
|
|||
ˆ |
gdsl ontentbin |
ee |
d mp ( onst _gdsl bin |
t T, onst _- |
|
|
internalw itestrufturn _t WRITE_F, FILEtreeOUTPUT_FILE, |
||||
|
voidgdsl_bintree |
|
|
|
|
|
DumpUSERthe_DATA) |
e of a low-level binary tre |
to a le. |
Generated on Thu Jun 22 11:15:30 2006 for gdsl by Doxygen

.2 _gdsl |
|
bstree.h File Referen e |
|
|
|
|
|
|
|
|
199 |
||||||||
5.2 |
|
|
gdsl_bstree.h |
File Referen e |
|
|
|
|
|||||||||||
Typedefs |
_gdsl |
bintree |
|
|
gdsl |
|
|
_ |
|
|
|
|
|
|
|||||
|
GDSL low-level binary sear h |
ee typbstree. |
|
|
|
|
|
|
|
||||||||||
|
typedef |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||
ˆ TREE, voidnt( |
_gdsl_bstree_mapfun tion_typ |
)(_gdsl_bstree_t |
|||||||||||||||||
ˆ |
|
|
|
id(-levelUSERbinaryDATA)sear h ee |
|
|
|
|
e. |
|
|
|
|
||||||
|
typedefGDSLvlow |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||
|
TREE, FILE |
_gdsl_bstree_writefun tion_typ )(_gdsl_bstree_t |
|||||||||||||||||
ˆ _tionsgdslDestrCrGDSLatebstreea new-levelbstreeOUTPUTlowbinary-levelgdslbinarysearFILE,bstreeh seareevoidhallotrbstreeUSER. ( onstDATA)gdsle. _element_t E) |
|||||||||||||||||||
Fun |
void |
|
|
gdsl |
|
|
_free ( |
gdsl |
|
|
_ |
T, |
onst |
gdsl_free_- |
|||||
|
|
|
|
F) |
|
|
|||||||||||||
|
fun _ FREE |
|
|
|
|
|
|
|
|
|
|
|
|
|
|||||
ˆ |
gdsl |
oy a low-level binary sear h tree. |
|
|
|
|
|
|
|
|
|||||||||
bstree |
t |
gdsl |
|
|
|
opy ( onst _gdsl_bstree_t T, |
|||||||||||||
|
|
opy a low-level binary searbstreeh . |
F) |
|
|
|
|
|
|
|
|
||||||||
|
onst gdsl |
opy |
fun _t COPY |
gdsl_ |
|
|
_t T) |
||||||||||||
|
bool |
|
gdsl |
bstree_is |
empty ( on t |
|
|
||||||||||||
|
|
leaf ( onst _gdsl . |
|
bstree |
T) |
|
|||||||||||||
ˆ |
Che k if a low-level binary sear h tree is emptyr du d |
o a l af. |
|
|
_gdsl_- |
||||||||||||||
gdsl |
|
elemen |
|
_gdsl |
bstree |
get |
onbstree ( onst |
||||||||||||
|
str |
|
e |
T) |
|
|
low-level binary sear h ten. |
|
|
|
|
||||||||
|
Get |
the root ont nt of |
|
|
|
|
|||||||||||||
|
Get the parentbstreeof a low-level |
sear h trbstree. |
|
T) |
|
||||||||||||||
|
bool |
|
gdsl |
|
|
is |
root ( onst _gdsl |
|
|
|
|
|
|||||||
ˆ |
Che k if a low-level binary |
sear h |
e is a root. |
|
|
( onst |
_gdsl_- |
||||||||||||
gdsl |
bstreeT) |
|
_gdsl |
bstree get_paren |
|||||||||||||||
|
bstr e |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||
Generated on Thu Jun 22 11:15:30 2006 for binarygdsl y Doxygen |
|
|
|
|
|

200 |
|
|
|
|
|
|
|
|
|
gdsl File Do umen |
|||
ˆ gdsl_bstree_ |
|
_gdsl_bstree get_left ( onst _gdsl_bstreetation |
|
||||||||||
|
T) Get |
|
left subree of a low-level binary sear h tree. |
( onst _gdsl_- |
|||||||||
ˆ gdsl |
bstree |
|
t |
gdsl |
bstree |
get |
|
righ |
|||||
|
bstree_ |
T) |
|
|
of a low-level bi |
ary sear h tr . |
|
|
|||||
|
Get |
the right sub- |
|
|
|||||||||
ˆ ulong _gdsl_bstree_get |
size ( onst |
gdsl_bstree_t T) |
|||||||||||
|
Get the size of a low-level binary sear h tree. |
|
gdsl_bstree_t T) |
||||||||||
ˆ ulong _gdsl_bstree_get |
height ( onst |
|
|||||||||||
|
Get the |
|
of |
low-level |
inary sear h tr e. |
|
|
|
ˆVALUE,onstgdslgdslbsinheightreelementomparegdslfun_bstreeCOMPinsertF, (onstgdslgdslbstreeel menteturnT,
ˆgdslInsertit. elemenan RESULT)intogdsla low_-bstreelevel binaryremovear h tree(_ifgdslit's notbstreefound ortr
ˆVALUE)T,VALUE)onstgdslRemoveSearonstgdslhbstreegdslforanaelementompareponstomparei ularfromgdslelementfunafunlow-levintoCOMPlCOMPabinsearlowry-levelhF,searF,(binaryhonstonsttree.seargdslgdslgdslh trelementbstreeelemen. __T,tt
ˆ |
gdsl |
|
T, |
|
gdsl_ |
|
sear h next |
( onst _ |
|
|
bstree |
|
gdsl |
|
bstree_fun t COMP |
F, onst gdsl_- |
|||
|
bstree |
bstree, onst |
|
gdsl_ |
map fun _( onstMAP_F, void |
||||
|
sear h |
e, a |
rding to theomparbin yartise ulh trelemorder. |
|
|||||
|
element |
VALUE) |
element of |
nt into a low-level binary |
|||||
ˆ |
Se |
|
for the |
|
|||||
gdsl |
|
|
next_gdsl |
|
_map pre x |
_gdsl - |
ˆbstreeUSERgdslParse_bstreeDAa lowT,A)-levelonstbinarygdslgdslsearbstreeh in__premapmapxed__inorderfunx. _( onstMAP__F,gdslvoid-
USERParse_DAa lowTA)-levelGeneratedbinary searon Thuh Junin22in11:15:30xed order2006. for gdsl by Doxygen

5.2 _gdsl_ |
.h File Referen e |
|
|
201 |
|||
ˆ |
bstreebstree, onst |
gdsl_bstree_map fun _t |
MAP_F, |
void |
|||
gdsl |
_gdsl |
|
post x ( onst _gdsl - |
||||
|
|
TA)-bstreelevelwritbinarywritefunsearbstreeh( onstWRITEinmapostgdslF,xed_FILEbstreeorder.bstreeT, onst |
_- |
||||
ˆ gdslUSERParsebstreegdslDAa low |
|
|
|
|
|
||
ˆ |
|
|
|
|
OUTPUT_FILE, |
||
|
bstreethel ontentDATA)bstreewriteof allwritenodesfun xmlof( onstaWRITElow( onst-level_binaryF,gdslFILEsear h |
e_to aT,le.onst |
|||||
|
_gdslWriteUSERgd |
|
|
|
|
|
|
ˆ |
bstreegdslhe ontentDATA)bstreewritof adumpfunlow-levelt |
|
OUTPUT_FILE, |
||||
biWRITEary seargdslF,h treFILEbstreetoa letintoT, XMLonst. |
_- |
||||||
|
gdslWriteUSER |
|
|
|
|
|
|
|
void |
|
|
|
OUTPUT_FILE, |
||
|
DumpUSERthe_internalDATA)stru ture of a low-level binary sear h tree to a le. |
|
Generated on Thu Jun 22 11:15:30 2006 for gdsl by Doxygen

202 |
|
|
|
|
|
|
|
|
|
|
|
|
|
gdsl File Do umentation |
|
5.3 |
gdsl_list.h File Referen e |
|
|||||||||||||
Typedefsˆ t |
_gdsl node |
|
t |
|
|
_list_t |
|
|
|||||||
|
GDSL low-level doubly-linkegdsllist type. |
|
|
|
|||||||||||
Fun tions |
list |
|
gdsl_ |
|
_allo |
|
gdsl_element_t E) |
||||||||
|
_gdsl |
|
|
|
|
||||||||||
ˆ |
Create a new low-level |
|
list. |
|
|
|
|
|
|||||||
void |
|
gdsl |
|
list |
|
free ( |
gdsl_list( onstL, onst gdsl_free_fun _t |
||||||||
|
FREE |
|
F) |
|
|
|
|
|
|
|
|
|
|
|
|
|
Destroy a low-level list. |
|
|
|
|
|
|
||||||||
|
bool |
|
gdsl_list is empt |
|
|
|
|
||||||||
|
Che k if a low-level list is |
empty. |
|
|
|
||||||||||
|
ulong |
|
gdsl |
list |
get |
size ( onst _gdsl_list_t L) |
|||||||||
|
Get the size of a |
|
ow-level list. |
|
|
|
|||||||||
ˆ void |
gdsl |
list |
link |
( |
gdsl_list_t L1, _gdsl_list_t L2) |
||||||||||
|
list_ nsert |
|
after ( gdsl_list_t L, _gdsl_list_t |
||||||||||||
|
Link two ow-level lists together. |
|
|
|
|||||||||||
|
PREV) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Insert a low-level list after another one. |
|
|
||||||||||||
ˆ void |
|
gdsl |
|
list_insert_before ( |
gdsl_list_t L, _gdsl_list_t |
||||||||||
|
SUCC) |
|
|
|
|
|
|
|
e another one. |
|
|
||||
|
Insert a low-level list b |
|
|
|
|||||||||||
ˆ |
void |
gdsl |
|
_removefor ( |
gdsl_node_t NODE) |
||||||||||
_gdsl |
|
list_list gdsl_list |
sear h (_gdsl_list_t L, onst gdsl_- |
||||||||||||
|
Remove a node from |
|
low-level list. |
|
|
|
ˆonstomparegdslSe gdslhlistforfunatnodepartigdslularCOMPmapnodelist_funF,inmapvoidlowt-forwardMAPlevelVALUE)listF,. (voidonst _gdsl_list_t L,
ˆonstgdslParsegdsllista low-tnodelevel li tmapinlistforwardfunmapordertbaMAP. kwardF, void(onstUSERgdslDATA)list t L,
Generated on Th Jun 22 11:15:30 2006 USERfor _byDATA)Doxygen

5.3 _gdsl |
list.h File Referen e |
|
203 |
||
Parse a low-level list in ba kward order. |
|
|
|||
ˆ void |
gdsl |
write ( onst _gdsl_list_t L, onst _gdsl_node |
|||
|
|
|
|
|
- |
|
dslenodeslistwritelistWRITEof writea funlow-levelF,xmltFILEWRITElist (toonsta OUTPUTleF,. FILEgdsl__FILE,list tvoidL, onstUSER__- |
||||
ˆ gdslvoidDATA)writeWritenofungall |
|
|
|
|
|
|
|
|
OUTPUT_FILE, void |
||
ˆ novUSERidWritee writegdslDATA)all nodeslistfunof dumpastrulow-turWRITElevel( onstlist_toF,agdslleFILEintolistXMLt. L, |
onst _gdsl_- |
||||
|
|
|
|
|
|
|
|
|
OUTPUT_FILE, void |
||
USERDump DATA)the internal |
e of a low-level list to a le. |
|
|
Generated on Thu Jun 22 11:15:30 2006 for gdsl by Doxygen

204 |
|
|
|
|
|
|
|
|
|
|
|
|
|
gdsl File Do umentation |
||
5.4 |
gdsl_node.h File Referen e |
|
|
|||||||||||||
Typedefs |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ˆ typedefGDSL_int(lowgdsl-levelno oublye _linkedgdsl_nonodetypet. |
|
|
|
|||||||||||||
|
NODE, void( _gdsl_node_map_fun tion)( onst _gdsl_node_t |
|||||||||||||||
ˆ typedefGDSLv low-levelUSERdoublyDATA)-linked node map |
type. |
|
|
|||||||||||||
|
NODE, FILE _gdsl_node_write_ |
fun tion)( onst _gdsl_node_t |
||||||||||||||
Fun _tionsgdslDestrCrGDSLatenodelowa-lowlevelOUTPUTlowt doubly-levelgdsl-nolinkednodeFILE,. nodevoidallowriteUSER(void)_DATA)type. |
|
|||||||||||||||
|
gdsl_element |
t _gdsl_node_free |
_gdsl_node_t NODE) |
|||||||||||||
|
|
|
oy a -level node. |
get_su ( onst |
_gdsl_node_t |
|||||||||||
ˆ gdsl_node_t |
_gdsl_node |
|||||||||||||||
|
NODE) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ˆ |
Get the su essor of a low-level node. |
|
|
|
|
|||||||||||
gdsl_ |
|
|
_t _gdsl_node |
get_pred ( onst _gdsl_node_t |
||||||||||||
|
Get |
|
|
nodepr de essor of a low-level node. |
|
|
|
|||||||||
|
NODE) |
|
|
|
|
t |
|
gdsl |
|
|
get_ ontent |
( onst |
_gdsl_- |
|||
ˆ gdsl |
elemen |
|
|
|
||||||||||||
|
Get |
the |
|
of a low-levelnode. |
|
|
|
|
|
|||||||
|
gdsl_nodeontentSUCC) |
|
|
|
|
|
|
|
|
|||||||
|
node_ |
|
|
NODE) |
|
set |
su |
( gdsl_node_t NODE, onst _- |
||||||||
ˆ void _g |
sl |
node |
||||||||||||||
|
Set the su essor of a low-lev l node. |
gdsl_node_t |
NODE, |
onst _- |
||||||||||||
ˆ void _g sl |
node |
set_pred |
( |
|||||||||||||
|
gdsl_nod |
t PRED) |
|
|
|
|
|
|
|
|
||||||
|
gdsl_element CONTENT) |
ode. |
|
|
|
|||||||||||
|
Set the pr de essor of |
|
low-level |
|
|
|
||||||||||
ˆ void |
|
gdsl |
Generated on Thu Jun 22 11:15:30 2006 for gdsl by Doxygen |
|||||||||||||
|
node |
set ontent |
|
(_gdsl_node_t NODE, onst |

5.4 _gdsl_node.h File Referen e |
|
205 |
|||||||
|
Set the ontent of a low-level node. |
|
|
||||||
ˆ void |
gdsl node |
link ( gdsl_node_t NODE1, _gdsl_node_t |
|||||||
NODE2) |
|
|
|
|
|
|
|
||
ˆ v |
Link two low-level nodes together. |
|
_gdsl_- |
||||||
|
gdsl node |
|
unlink |
(_gdsl_node_t NODE1, |
|||||
noide |
t NODE2) |
|
|
|
|
|
|
|
|
|
Unlink two low-l vel nodes. |
|
_gdsl_node_t NODE, |
onst _- |
|||||
ˆ void |
gdsl node |
write |
|
||||||
gdsl_node_write_fun _( WRITEonst_F, FILE OUTPUT_FILE, void |
|||||||||
|
|
gdslnodeDATA)a ownode-levelwritenodewritefunto a xmllet. WRITE(onst _gdslF, FILEnode_t NODE, onst |
|||||||
ˆ USERgdslWrite |
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
OUTPUT_FILE, |
|
|
|
|
|
|
|
tura t(leWRITEonstinto XMLgdslF,. FILEnode_t NODE, onst _- |
|||
|
|
|
|
|
mp |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
df nto |
|
|
|
|||
|
|
|
stru |
|
|
|
|
|
|
voidWriteUSERnodegdsla low-nodeDATA)writelevel no |
|
|
|
|
|
|
|||
ˆ gdsl |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
OUTPUT_FILE, void |
|
USERDump DATA)the internal |
|
|
|
e of a low-level node to a le. |
|
Generated on Thu Jun 22 11:15:30 2006 for gdsl by Doxygen

206 |
gdsl File Do umentation |
5.5 gdsl.h File Referen e |
|
F |
|
unˆ tionsonstGet harGDSLgdslversiongetnumbversionas a string(void). |
|
Generated on Thu Jun 22 11:15:30 2006 for gdsl by Doxygen