
Заготовки по С / Динамические структуры / GDSL / Документация
.pdf
.6 gdsl 2darray.h File Referen e |
207 |
5.6 gdsl_2darray.h File Referen e |
|
T |
|
Funypedefsˆˆ ttionsGDSL2darragdsl2D-array2darray t typgdsle. gdsl2darray2darrayallot ( onst |
har |
ulonggdslvoidonstCrGetDgdslstroyatefreeharR, nameonst2darranew2Dfun-2Dulong-y2darraty.FREEayfC,ee. (onstgdslF) gdsl2darrayallo( onstfunA) _t ALLOCNAME,F, onst
ˆ 2darrayulongA)ulongGetGet thethethegdslgdsltnumbernumbergdslA)2darray2darraofofof 2Dowsolumns-ygetofyaygetaof.get2Drowsa-2Darrayolumnsname-array.umber. number( gdslonst_gdsl2darray( onst2darraygdsltA)__t- |
||||
ˆ |
|
|
|
|
|
|
gdsl |
y get_size ( onst gdsl_2darray A) |
|
|
|
size2darraof 2D-array. |
( onst gdsl_- |
|
ˆ ulongelemen |
gdsl 2darray_get_ ontent |
|||
|
Get an element |
from a 2Day. |
|
|
ˆ gdsl |
2darray onstgdsl_2darray_set_name (gdsl_2darray_t A, |
|||
2 |
array A, |
ulong R, onst ulong C) |
|
ˆgdslonstonstSet_ulongelementheharnameNEWR,t ofotagdslNAME)st2Dulong-array2darra.C, voidy set_ ontent (gdsl_2darray_t A,
ˆvoidwriteModifygdslfunan2darrayelemet WRITEn inwritea 2DF,- (FILEonstay. gdslVALUE)2darray_t A, onst gdsl
GeneratedDATA)on Th Jun 22 11:15:30 2006 for gdsl OUTPUTby Doxygen_FILE, void USER_-

208ˆ
ˆ
Write the ontent of a 2D-array to a le. gdsl File Do umentation void gdsl_2darray_write xml ( onst gdsl_2darray_t A, onst
gdsl_write_fun _t WRITE_F, FILE OUTPUT_FILE, void
writevoidUSERWritegdslfunDATA)the2darrayontentWRITEof dumpa 2DF,array(FILEonstto agdslle into2darraXML.y_t A, onst gdsl
DATA)Dump the internal stru ture of a 2D arrayOUTPUTto le.FILE, void USER_-
Generated on Thu Jun 22 11:15:30 2006 for gdsl by Doxygen

.7 gdsl b tree.h File Referen e |
209 |
|
5.7 |
gdsl_bstree.h File Referen e |
|
T |
|
|
Funypedefsˆˆ gdslttionsGDSLbstreegdslbinarybstreetseargdslh gdsltreebstreetypbstree. allot ( onst |
har |
alloompvoidCrDestrFlushgdslaharfunteoyabinarybstreefunnewbinaryt binaryALLseartsearbstreeCOMPfreehushsearh (gdsl(F,.hgdsl.F)gdsl.bstreebstreefree( onstfunT)T) _t FREENAME,F, gdsl_-
ˆ T)gdslboolonstCheGetgdslelementhekifrootnamebstreegdslbinaryofofa abinarysegdslbinaryis hemptyseartrbstreesegetarishhempty(settrnameonst.get. . gdslrootbstreegdsl( onst__bstreegdslT) __bstreetT) _t
|
ulong gdslsize of a |
size ( onst gdsl_bstree |
T) |
T) |
|||
ˆ |
getsearheighh .( onst gdsl_bstree |
|
|||||
gdsl bstreebstreegdsl |
bstree |
tr e. |
name (gdsl_bstree_t T, onst |
||||
|
Get the height of binarybinary sear h |
|
|
|
|
||
ˆ |
elementhe nameelementNAME)of a binarygdsl_bstreesear h tr_insert. |
(gdsl_bstree_t T, void |
|||||
|
gdslharSetNEW |
|
|
|
|
|
|
ˆ |
|
|
remoh tr veif it's(gdslnot_foundbstreeor_returnT, itvoid. |
||||
|
gdslVALUE,Insertelemenanin RESULT)gdslinto a bina y sear |
|
|
|
|
GeneratedVALUE)on Thu Jun 22 11:15:30 2006 for gdsl by Doxygen

210 |
Remove an |
|
gdsl File Do umentation |
|
|
from a binary sear h tree. |
|
||
ˆ gdsl bstree_elementgdsl bstree_delete |
(gdsl_bstree_t T, void |
ˆ VALUE)Deleteelemenomparean elementartifungdslularfromelementabstreeCOMPinary sesearF, hvoidtreeh . ( onst gdsl_bstree_t T,
ˆgdslT, gdslSeareleh forapent__fungdslwriteMAPbstreeF,intomapvoidbinarypreVALUE)searx (h onsttree. gdsl_bstree_t
ˆgdslgdslT, Parseelemenbinaryapt__funse gdslh tr_MAPin prF,xevmaporderUSERin. x_(DATA)onst gdsl_bstree_t
ˆgdslt T,Parsegdsla bin tpry__sefungdslh_trbstreeMAPin in xedF,mapvoidorderUSERpost. xDATA)( onst gdsl_bstree_-
ˆvoidfunParseritegdslWRITEa binbstreeary searF, FILEh tr in( onstpt xegdslorderbstreeUSER. _bstreeDAT,A)gdsl_write_-
ˆvoidwriteW gdslfunthe_bstreeelementWRITEof a hF,nodeOUTPUTxmlFILEof a( bionstaryFILE,gdslsearvoidh USERto a tle.DATA)T, gdsl
ˆDATA)voidfunWritegdslWRITEthe ont _F,ofdumpFILEa binary( onstsear hgdsltreeOUTPUTtobstreea le intoFILE,XMLT, voidgdsl. writeUSER__--
Dump the internal stru tureOUTPUTof a binary_FILE,sear h voide USERa le. _DATA)
Generated on Thu Jun 22 11:15:30 2006 for gdsl by Doxygen

.8 gdsl hash.h File Referen e |
|
|
211 |
|
5.8 gdsl_hash.h File Referen e |
|
|
|
|
Typedefs |
|
|
|
|
hashonst_tablehartypegdsl. _hash_t |
|
|
|
|
ˆ typedef ulong( |
key( fungdsltionkeytype. fun )( onst)(void VALUE) |
|||
GDSLgdslhashtablehashgdslhash( onstfunhashhartionfuntype._t |
har |
|
KEY) |
|
Fun ulongtions |
|
|
|
ˆgdslComputeshash_at gdslvaluehashfrom alloNULLKEY)( oterminatest hard hara ter string.
funENTRIESvoidDestrCrgdslateoyKEYaALLOChashtablenewNB)F,hashtablefreegdslF,ush. (gdsl.gdsl(gdslhash___freehashhashfunfunt(H)onstH)HASHFREENAME,F,ushortF,gdslgdslINITIALallokey_-
|
Flush |
|
. |
|
|
|
|
|
|
|
|
etries. a tshashtablenamemaxallowedumbersize. in sizea((gdslhonstentrygdslgdslhashof a hashtableH) .H)H) |
|||
|
|
|
|
longest |
|
|
|
|
Get hargdslgdslthe maxnumbamegdslhashnumbererofofahashentrieshashtablgetgetof elemeenlistsof |
|
|
|
|||
ˆ ushortonst |
|
|
|
|
|
|
|
H) |
|
gdsl |
hash get |
|
list_ |
|
( onst gdsl hash_t |
|
number of el ments of the lon est list entry of a hashtable. |
||||||
ˆ ulong gdsl |
_get |
size ( onst gdsl |
hash_t H) |
||||
|
Get the sizehashof hashtable. |
|
|
|
|||
Generated on Thu Jun 22 11:15:30 2006 for gdsl by Doxygen |
|

212 |
|
|
gdsl File Do umentation |
|
double gdsl |
hash_get ll fa tor |
gdsl_hash_t H) |
ˆ gdsl hash |
fa gdsltor _hash set_name( onstgdsl_hash_t H, onst har |
||
|
Get the ll |
of hashtable. |
|
ˆ gdslNEWSet elementheNAME)nameelementof a hashtablegdsl hash. _insert |
(gdsl_hash_t H, void |
ˆ gdslVALUE)Insertelemenan elementgdslinto a hashshtableremove(PUSH)(POP).gdsl_hash_t H, onst har
ˆ |
gdslKEY)Removehashanelementgdsl_fromhashhashtabledelete gdsl._hash_t H, onst har |
ˆˆ |
elemenhashaseanhashtabletheNB,dimensionsgdslartiushortgdslularfromhashNEWofhashhashtablemodifyLISTSashtablesear. (.hashtablegdslMAX(onsthashSIZE)gdslt_H,hashushortt H,NEWonst- |
|
gdslENTRIESgdslharKEY)InDeleter |
ˆgdslmapSearKEY)elemenfunh for pMAPgdslF,_elementvoidhash_intomap ( onst gdsl(GET)hash. _t H, gdsl_-
ˆvoidWRITEParsegdslaF, FILE_write. ( onst USERgdsl__hashDATA)t H, gdsl_write_fun _t
ˆvoidfun gdslrite WRITEallhashthe elementsF,writeOUTPUTFILEof axmlhashtableFILE,(onsttovoidgdslleUSER.hash_DATA)t H, gdsl_write_-
ˆWRITEvoid gdsl_theF,hashFILEontentdumpof a hashtable( onstOUTPUTgdslto a hashleFILE,into XMLtvoidH,.gdslUSERwriteDATA)fun _t
Dump the internalGeneratedOUTPUTstru tureon ofThuFILE,a hashtableJun void22 11:15:30toUSERa le2006. DATA)for gdsl by Doxygen

5.9 gdsl_heap.h File Referen e
.9 gdsl heap. File Referen e |
213 |
T
Funypedefsˆˆ gdslttionsGDSLheapheapapttypegdslgdsl. __heapheap__tallo ( onst har
|
ateoyALLOCCOMPaheapnwheap.F)F,free.ushgdsl(gdsl(gdslfreeheapheapfun t( H)onstH)FREE NAME,F,gdslgdslompareallo _- |
||||||
|
gdsl |
|
|
|
|
|
|
|
voidfunDestrCr |
|
|
|
|
|
|
|
Flush |
he . |
|
|
|
|
|
|
Getelementhargdslthe topsizenamegdslheapofofoftheapgdslget.. . heapsizeget(namegetonst gdsltop ( heaponstgdslgdsltheapH)heapt H)t H) |
|
|||||
|
gdslulongonst |
|
|
|
|
|
|
|
bool gdsl_ |
is |
empty ( onst gdsl_heap_t H) |
|
|
||
ˆ |
Che k if ahe |
is empty. |
_set_name (gdsl_heap_t H, onst har |
||||
gdsl heap_t gdsl |
|
||||||
ˆ gdslNEWSet elementheNAME)namethe oftopa hegdslheap. heap_set_top (gdsl_heap_t |
H, |
void |
|||||
ˆ gdslVALUE)Substituteelemen _ |
elementgdsl_of heapinsertby a lesser(gdslone. heap_t |
H, |
void |
Generatedˆ gdslVALUE)InsertonelemenThuanJunelement22 11:15:30gdslinto aheap2006 (PUSH)forremovegdsl .by Doxygentop (gdsl_heap_t H)

214 |
R |
the top element from a he |
(POP).gdsl File Do umentation |
|
|
Deletemovethe |
from he . |
top (gdsl_heap_t H) |
|
ˆ gdsl |
h ap_ gdsl heap delete |
|||
ele entop_elementgdsl_heap_map_forward ( onst gdsl_heap_t |
ˆH,voidWRITEgdslParsegdsl_amF,heapFILE. funwrite (MAPonst_gdslF, voidheapUSERt H,DATA)gdsl write_fun _t
ˆvoidfun gdslrite WRITEallheapthe elementsF,writeOUTPUTFILEof axmlheapFILE,(toonsta voidgdslle. USERheap__DATA)t H, gdsl_write_-
ˆvoidfunW_gdslWRITEthe heapontentF,ofdumpFILEa heap(OUTPUTtoonsta legdslintoFILE,XMLheap.voidt USERH,gdslDATA)write_-
Dump the internal stru tureOUTPUTof a heap toFILE,a le. void USER_DATA)
Generated on Thu Jun 22 11:15:30 2006 for gdsl by Doxygen

.10 gdsl list.h F le Referen e |
|
|
215 |
||
5.10 gdsl_list.h File Referen e |
|
||||
Typedefs |
|
|
|
|
|
ˆ |
|
ur ortypelist. |
_t |
|
|
|
typedef _gdsl_list gdsl |
|
|
|
|
|
GDSLlistdoublyt gdsl-linkedlistlist ursorallogdsltype( listo. st_ ursorhar _t |
|
|||
Funˆ gdsltions |
|
|
|
|
|
|
gdslateharoyALLOCalistalistnew..listfreeF,ush. gdsl(gdsl(gdsl__freelistlist___funttL)L)_t |
FREENAME,F) |
|
||
|
voidfunFlushDestrCr |
|
|
gdsl_allo _- |
GetChegdslgdslthek ifnamesizealistgdsllistofofisaisaemptylistgetlistempty. ..sizeget (nameonst gdsl( onstlistgdsltt_L)list_t L) |
||||
ulongboolonst |
|
|
|
head ( onst gdsl_list_t L) |
|
|
head of a list. |
||
|
element t gdsl_list_get_tail ( onst gdsl_list_t L) |
|||
Get the |
|
of a list. |
|
|
ˆ gdsl |
list_tail |
gdsl list_set_name (gdsl_list_t L, onst |
ˆ gdslNEWSet elementheNAME)nameelementof a listgdsl. _list_insert_head (gdsl_list_t L,
GeneratedVALUE)Inserton ThuanJun 22 11:15:30at the head2006 offoragdsllist.by Doxygen
har void

216 |
gdsl Fi e Do umentation |
|
ˆ gdsl_elemen _ |
gdsl_list_insert_tail (gdsl list t L, void |
|
ˆ gdslVALUE)InsertRemoveemoveel anmentheelementartiheadailularofgdslofatgdslalithelist.listtail.listofremovearemovelist. headtail(gdsl(gdsl(gdsllistlistlistt t L,tL)L) gdsl_-
ˆ gdslomparDeleteR listtheafuntptailheadgdslgdslofof__COMPlistelement.. deletedeleteF,fromonst(tailheadgdsllistvoid(.gdsl(gdsllistVALUE)listlistL,t gdsltL)L)_ ompare_-
ˆ
ˆˆ
ˆ
ˆ
ˆ
funompargdsl eCOMPamenparfunti artielementularF,gdslularCOMPelementonst voidlistfromF, searVALUE)onstlisthvoid. ( onst gdsl_list_t L, gdsl_-
gdsllistSeSearSeartelementelementL,omparehhh forforforulongaanthp_grPOS)funatestgdslgdslelementbyelementlistitsCOMPpositionofsearintosearF)listinhhlist.a.maxbylistVALUE). position( onst gdsl( onstlistgdslt _L,-
|
element_ gdsl_list |
of |
|
h_min ( onst gdsl_list_t L, |
||
Sear h for th |
lowest |
|
list. |
|||
gdsl |
|
_fun |
COMP_F) |
|
||
t gdsl list_sort |
(gdsl_list_t L, gdsl_ ompare_- |
|||||
fun |
listCOMP |
F) |
|
|
|
|
Sort list. |
|
|
|
|
|
|
|
element_ gdsl_list_map_forward ( onst gdsl_list_t L, |
gdslParsemaplistfunfromGeneratedheadMAPto tailonF,.ThuvoidJun USER22 11:15:30DATA)2006 for gdsl by Doxygen