LIBCDT(3)
๐ LIBCDT(3) โ Cdt: container data types ๐
Okay so welcome to LIBCDT(3), bestie โ this is the manual page for Cdt, and it's literally all about container data types. We're talking run-time dictionaries with unordered set/multiset, ordered set/multiset, list, stack, and queue energy. Slay. ๐
โจ NAME โจ
Cdt โ container data types. That's the name, no cap.
๐ SYNOPSIS ๐
First things first, you gotta include the header:
#include <cdt.h>
๐งธ DICTIONARY TYPES
These are the type names chilling in the synopsis:
Void_t*;
Dt_t;
Dtdisc_t;
Dtmethod_t;
Dtlink_t;
Dtstat_t;
๐๏ธ DICTIONARY CONTROL
The control functions, exactly as listed:
Dt_t* dtopen(const Dtdisc_t* disc, const Dtmethod_t* meth);
int dtclose(Dt_t* dt);
void dtclear(dt);
Dtdisc_t* dtdisc(Dt_t* dt, const Dtdisc_t* disc, int type);
Dtmethod_t* dtmethod(Dt_t* dt, const Dtmethod_t* meth);
Dt_t* dtview(Dt_t* dt, Dt_t* view);
int dtcustomize(Dt_t* dt, int type, Void_t* arg);
int dtoptimize(Dt_t* dt);
int dtshare(Dt_t* dt, int type);
int dtlock(Dt_t* dt, unsigned int key, int type);
๐งฐ STORAGE METHODS
The storage method variables, verbatim:
Dtmethod_t* Dtset;
Dtmethod_t* Dtbag;
Dtmethod_t* Dtrhset;
Dtmethod_t* Dtrhbag;
Dtmethod_t* Dtoset;
Dtmethod_t* Dtobag;
Dtmethod_t* Dtlist;
Dtmethod_t* Dtstack;
Dtmethod_t* Dtqueue;
Dtmethod_t* Dtdeque;
๐ DISCIPLINE
Macros and function-pointer typedefs, coming right up:
#define DTOFFSET(struct_s,member)
#define DTDISC(disc,key,size,link,makef,freef,comparf,hashf,memoryf,eventf)
typedef Void_t* (*Dtmake_f)(Dt_t*, Void_t*, Dtdisc_t*);
typedef void (*Dtfree_f)(Dt_t*, Void_t*, Dtdisc_t*);
typedef int (*Dtcompar_f)(Dt_t*, Void_t*, Void_t*, Dtdisc_t*);
typedef unsigned int (*Dthash_f)(Dt_t*, Void_t*, Dtdisc_t*);
typedef Void_t* (*Dtmemory_f)(Dt_t*, Void_t*, size_t, Dtdisc_t*);
typedef int (*Dtevent_f)(Dt_t*, int, Void_t*, Dtdisc_t*);
๐ซถ OBJECT OPERATIONS
All the object-operation signatures, exactly:
Void_t* dtinsert(Dt_t* dt, Void_t* obj);
Void_t* dtappend(Dt_t* dt, Void_t* obj);
Void_t* dtdelete(Dt_t* dt, Void_t* obj);
Void_t* dtattach(Dt_t* dt, Void_t* obj);
Void_t* dtdetach(Dt_t* dt, Void_t* obj);
Void_t* dtsearch(Dt_t* dt, Void_t* obj);
Void_t* dtmatch(Dt_t* dt, Void_t* key);
Void_t* dtfirst(Dt_t* dt);
Void_t* dtnext(Dt_t* dt, Void_t* obj);
Void_t* dtlast(Dt_t* dt);
Void_t* dtprev(Dt_t* dt, Void_t* obj);
Void_t* dtleast(Dt_t* dt, Void_t* obj);
Void_t* dtmost(Dt_t* dt, Void_t* obj);
int dtwalk(Dt_t* dt, int (*userf)(Dt_t*, Void_t*, Void_t*), Void_t*);
Dtlink_t* dtflatten(Dt_t* dt);
Dtlink_t* dtlink(Dt_t* dt, Dtlink_t* link);
Void_t* dtobj(Dt_t* dt, Dtlink_t* link);
Dtlink_t* dtextract(Dt_t* dt);
Dtlink_t* dtrestore(Dt_t* dt, Dtlink_t* link);
๐ DICTIONARY STATUS
Status functions, no edits:
Dt_t* dtvnext(Dt_t* dt);
ssize_t dtvcount(Dt_t* dt);
Dt_t* dtvhere(Dt_t* dt);
ssize_t dtsize(Dt_t* dt);
ssize_t dtstat(Dt_t* dt, Dtstat_t* st);
#๏ธโฃ HASH FUNCTIONS
Hash function signatures, exactly:
unsigned int dtstrhash(unsigned int h, char* str, int n);
unsigned int dtcharhash(unsigned int h, unsigned char c);
๐ DESCRIPTION ๐
So Cdt manages run-time dictionaries using standard container data types: unordered set/multiset, ordered set/multiset, list, stack, and queue. It's giving range, honestly. ๐
๐งฌ DICTIONARY TYPES
Void_t*
This type is used to pass objects between Cdt and application code. Void_t is defined as void for ANSI-C and C++ and as char for older C compilation environments. Bestie, it's a whole shape-shifter depending on your compiler era. ๐ฆ
Dt_t
This is the type of a dictionary handle.
Dtdisc_t
This defines the type of a discipline structure, which defines the lay-out of an object and functions to compare, hash, make, delete objects, etc. (see dtdisc()).
Dtmethod_t
This defines the type of a container method.
Dtlink_t
This is the type of a dictionary object holder (see dtdisc()).
Dtstat_t
This is the type of a structure to return dictionary statistics (see dtstat()).
๐ฎ DICTIONARY CONTROL
Dt_t* dtopen(const Dtdisc_t* disc, const Dtmethod_t* meth)
This creates a new dictionary. disc is a discipline structure to describe object format. meth specifies a manipulation method. dtopen() returns the new dictionary or NULL on error. See also the events DT_OPEN and DT_ENDOPEN below. โจ
int dtclose(Dt_t* dt)
This deletes dt and its objects. Note that dtclose() fails if dt is being viewed by some other dictionaries (see dtview()). dtclose() returns 0 on success and -1 on error. See also the events DT_CLOSE and DT_ENDCLOSE below.
void dtclear(Dt_t* dt)
This deletes all objects in dt without closing dt. Like clearing the group chat but keeping the chat itself. ๐ญ
Dtdisc_t* dtdisc(Dt_t* dt, const Dtdisc_t* disc, int type)
If disc is NULL, dtdisc() returns the current discipline. Otherwise, it changes the discipline of dt to disc. Objects may be rehashed, reordered, or removed as appropriate. type can be any bit combination of DT_SAMECMP and DT_SAMEHASH.
DT_SAMECMP means that objects will compare exactly the same as before, thus obviating the need for reordering or removing new duplicates. DT_SAMEHASH means that hash values of objects remain the same, thus obviating the need to rehash.
dtdisc() returns the previous discipline on success and NULL on error.
Dtmethod_t dtmethod(Dt_t* dt, const Dtmethod_t* meth)
If meth is NULL, dtmethod() returns the current method. Otherwise, it changes the storage method of dt to meth. Objects may be rehashed, reordered, or removed as appropriate. dtmethod() returns the previous method or NULL on error.
Dt_t* dtview(Dt_t* dt, Dt_t* view)
A viewpath allows a search or walk starting from a dictionary to continue to another. dtview() first terminates any current view from dt to another dictionary. Then, if view is NULL, dtview returns the terminated view dictionary. If view is not NULL, a viewpath from dt to view is established. dtview() returns dt on success and NULL on error.
It is an error to have dictionaries on a viewpath with different storage methods. In addition, dictionaries on the same view path should treat objects in a consistent manner with respect to comparison or hashing. If not, undefined behaviors may result. ๐
int dtcustomize(Dt_t* dt, int type, Void_t* arg)
This customizes a storage method. The type argument indicates the type of customization and arg gives additional information for the operation. Here are the types:
DT_SHAREโ This turns on/off the share mode for a dictionary. Concurrent accesses of a dictionary not in share mode may exhibit undefined behaviors including memory segmentation. Share mode allows multiple accessors, threads or processes, to access objects. Such objects could be in the same directory in the case of threads or shared memory in the case of processes.DT_OPTIMIZEโ This causes the underlying method to optimize its internal data structure. For example, the splay tree underlyingDtosetwould be balanced.
int dtoptimize(Dt_t* dt)
This is a short-hand for invoking dtcustomize() with the DT_OPTIMIZE event.
int dtshare(Dt_t* dt, int type)
This turns on or off share mode for dictionary dt depending on whether type is positive or non-positive. It returns -1 on failure.
int dtlock(Dt_t* dt, unsigned int key, int type)
This globally locks/unlocks a dictionary using the given key. It returns 0 on success and -1 on failure. The value of key must not be 0. The argument type is used as follows:
type < 0: Unlock the dictionary if it was locked withkey. An error will result if the dictionary was locked with a differentkey.type == 0: Attempt to lock the dictionary withkeyif it is unlocked. An error will result if the dictionary was already locked with a differentkey.type > 0: Attempt to lock the dictionary withkey. If the dictionary is already locked with a differentkey, the call will loop and wait until the lock is open to lock it.
๐๏ธ STORAGE METHODS
Storage methods are of type Dtmethod_t*. Cdt supports the following methods:
Dtoset,Dtobagโ Objects are ordered by comparisons.Dtosetkeeps unique objects.Dtobagallows repeatable objects. ๐ธDtset,Dtbagโ Objects are unordered.Dtsetkeeps unique objects.Dtbagallows repeatable objects. The underlying data structure is a hash table with chaining to handle collisions.Dtrhset,Dtrhbagโ These methods are likeDtsetandDtbagbut are based on a recursive hashing data structure that allows table extension without object relocation. The data structure also supports lock-free concurrent search operations for share dictionaries. ๐ฅDtlistโ Objects are kept in a list. A current object is always defined to be either the head of the list or an object resulting from a recent search or insert operation. The calldtinsert()will insert a new object in front of such a current object while the calldtappend()will append in back of it.Dtdequeโ Objects are kept in a deque. This is similar toDtlistexcept that objects are always inserted at the front and appended at the tail of the list.Dtstackโ Objects are kept in a stack, i.e., in reverse order of insertion. Thus, the last object inserted is at stack top and will be the first to be deleted. ๐Dtqueueโ Objects are kept in a queue, i.e., in order of insertion. Thus, the first object inserted is at queue head and will be the first to be deleted.
๐ DISCIPLINE
Object format and associated management functions are defined in the type Dtdisc_t:
typedef struct
{ ssize_t key, size;
ssize_t link;
Dtmake_f makef;
Dtfree_f freef;
Dtcompar_f comparf;
Dthash_f hashf;
Dtmemory_f memoryf;
Dtevent_f eventf;
} Dtdisc_t;
ssize_t key, size
Each object obj is identified by a key used for object comparison or hashing. key should be non-negative and defines an offset into obj. If size is negative, the key is a null-terminated string with starting address *(Void_t**)((char*)obj+key). If size is zero, the key is a null-terminated string with starting address (Void_t*)((char*)obj+key). Finally, if size is positive, the key is a byte array of length size starting at (Void_t*)((char*)obj+key). ๐
ssize_t link
Let obj be an object to be inserted into dt. If link is negative, an object holder of type Dtlink_t will be allocated to hold obj. Otherwise, obj should have a Dtlink_t structure embedded link bytes into it, i.e., at address (Dtlink_t*)((char*)obj+link).
Void_t* (*makef)(Dt_t* dt, Void_t* obj, Dtdisc_t* disc)
If makef is not NULL, dtinsert(dt,obj) or dtappend() will call it to make a copy of obj suitable for insertion into dt. If makef is NULL, obj itself will be inserted into dt.
void (*freef)(Dt_t* dt, Void_t* obj, Dtdisc_t* disc)
If not NULL, freef is used to destroy data associated with obj.
Okay, back to the Dtdisc_t field tour, bestie โ we were just getting to the good part ๐
int (*comparf)(Dt_t* dt, Void_t* key1, Void_t* key2, Dtdisc_t* disc)โ if this isnโtNULL, itโs the comparison queen: it compares two keys and returns<0,=0, or>0to say whetherkey1is smaller than, equal to, or larger thankey2. ForDtosetandDtobag, all three values are significant โ yes, literally all of them. For other methods, a zero value means equality and a non-zero value means inequality. If(*comparf)()isNULL, an internal function compares the keys using theDtdisc_t.sizefield. Slay.unsigned int (*hashf)(Dt_t* dt, Void_t* key, Dtdisc_t* disc)โ if this isnโtNULL, it computes the hash value ofkey. It is required that keys compared equal will also have same hash values โ no cap, thatโs the vibe check. IfhashfisNULL, an internal function hashes the key as defined by theDtdisc_t.sizefield.Void_t* (*memoryf)(Dt_t* dt, Void_t* addr, size_t size, Dtdisc_t* disc)โ if this isnโtNULL, it handles memory allocation and freeing. WhenaddrisNULL, a memory segment of sizesizeis requested. Ifaddris notNULLandsizeis zero,addris to be freed. Ifaddris notNULLandsizeis positive,addris to be resized to the given size. IfmemoryfisNULL,malloc(3)is used. Memory management but make it fashion ๐int (*eventf)(Dt_t* dt, int type, Void_t* data, Dtdisc_t* disc)โ if this isnโtNULL, it announces various events. Each event may have particular handling of the return values fromeventf. But a negative return value typically means failure. Following are the events:DT_OPENโ this event is raised at the start of the process to open a new dictionary. The argumentdatawill be a pointer to an object of typeVoid_t*initialized toNULLbefore the call. The return value ofeventf()is significant as follows:- On a negative return value,
dtopen()will return failure. - On a zero return value,
eventf()may set*(Void_t**)datato some non-NULLvalue to indicate that the dictionary structure itself should be allocated along with theDtdisc_t.datasection. Otherwise, it will be allocated separately withmalloc(3). - On a positive return value, the dictionary is being reconstructed based on existing states of some previous dictionary. In this case,
eventf()should set*(Void_t**)datato point to the fieldDt_t.dataof the corresponding previous dictionary (seeDT_CLOSEbelow). If the handle of the previous dictionary was created as discussed above in the case of the zero return value, it will be exactly restored. Otherwise, a new handle will be allocated withmalloc(). The ability to create different dictionaries sharing the same set of objects allows for managing objects in shared and/or persistent memory. Iconic behavior, honestly.
- On a negative return value,
DT_ENDOPENโ this event is raised at the end of the process to open a dictionary. The return value ofeventf()will be ignored.DT_CLOSEโ this event is raised at the start of the process to close dictionarydt. The return value ofeventfis significant as follows:- On a negative return value,
dtclose()will return failure. - On a zero return value, all dictionary objects will be deleted and all associated memory will be freed.
- On a positive return value, allocated objects and memory will be kept intact. This means that
dt->dataremains intact and can be reused in some future dictionary (seeDT_OPENabove). Note, however, thatdtitself would still be freed if it was allocated withmalloc(3).
- On a negative return value,
DT_ENDCLOSEโ this event is raised at the end of the process to close a dictionary. The return value ofeventf()will be ignored.DT_DISCโ the discipline ofdtis being changed to a new one given in(Dtdisc_t*)data.DT_METHโ the method ofdtis being changed to a new one given in(Dtmethod_t*)data.DT_HASHSIZEโ this event is applicable to the methodsDtset,Dtbag,DtrhsetandDtrhbag. It is typically issued when the respective internal data structure of a method is about to be initialized. If the return value of the event handling function is positive,*(ssize_t*)datais examined for further action; else, it is ignored. A positive return value means that the event function wishes to suggest a table size. It does that by setting*(ssize_t*)datato the desired size. Then, the actual table size will be the maximum of the absolute value of*(ssize_t*)dataand some predefined value set by the method. In addition, if*(ssize_t*)datawas negative, theDtsetandDtbagmethods will never resize the hash table. Big brain table energy ๐ฅDT_ERRORโ this event announces an error that occurred during some operations. The argument(char*)datais a null-terminated string describing the error.
#define DTOFFSET(struct_s,member)โ this macro function computes the offset ofmemberfrom the start of structurestruct_s. It is useful for getting the offset of aDtlink_tembedded inside an object. Very โwhere does this liveโ of it.#define DTDISC(disc,key,size,link,makef,freef,comparf,hashf,memoryf,eventf)โ this macro function initializes the discipline pointed to bydiscwith the given values. Set it up and let it cook ๐ธ
๐ OBJECT OPERATIONS ๐
๐ฆ dtinsert, dtappend
Void_t* dtinsert(Dt_t* dt, Void_t* obj)
Void_t* dtappend(Dt_t* dt, Void_t* obj)
These functions add an object prototyped by obj into dt. dtinsert() and dtappend() perform the same function for all methods except for Dtlist (see Dtlist for details). If there is an existing object in dt matching obj and the storage method is Dtset, Dtrhset or Dtoset, dtinsert() and dtappend() will simply return the matching object. Otherwise, a new object is inserted according to the method in use. See Dtdisc_t.makef for object construction. The new object or a matching object as noted will be returned on success while NULL is returned on error.
๐ dtdelete
Void_t* dtdelete(Dt_t* dt, Void_t* obj)
If obj is NULL, methods Dtstack and Dtqueue delete respectively stack top or queue head while other methods do nothing. If obj is not NULL, an object matching obj is deleted. See Dtdisc_t.freef for object destruction. dtdelete() returns the deleted object (even if it was deallocated) or NULL on error. Itโs giving cleanup era ๐งน
โจ dtattach
Void_t* dtattach(Dt_t* dt, Void_t* obj)
This function is similar to dtinsert() but obj itself will be inserted into dt even if a discipline function makef is defined. No copy, just vibes.
๐ dtdetach
Void_t* dtdetach(Dt_t* dt, Void_t* obj)
This function is similar to dtdelete() but the object to be deleted from dt will not be freed (via the discipline freef function). Detach and dip, bestie.
๐ dtsearch, dtmatch
Void_t* dtsearch(Dt_t* dt, Void_t* obj)
Void_t* dtmatch(Dt_t* dt, Void_t* key)
These functions find an object matching obj or key either from dt or from some dictionary accessible from dt via a viewpath (see dtview()). dtsearch() and dtmatch() return the matching object or NULL on failure. Finding your fave in the group chat energy.
๐ dtfirst, dtnext
Void_t* dtfirst(Dt_t* dt)
Void_t* dtnext(Dt_t* dt, Void_t* obj)
dtfirst() returns the first object in dt. dtnext() returns the object that follows an object matching obj. Objects are ordered based on the storage method in use. For Dtoset and Dtobag, objects are ordered by object comparisons. For Dtstack, objects are ordered in reverse order of insertion. For Dtqueue, objects are ordered in order of insertion. For Dtlist, objects are ordered by list position. For Dtset, Dtbag, Dtrhset and Dtrhbag, objects are ordered by some internal order defined at the time when these functions are called.
Objects in a dictionary or a viewpath can be walked using a for(;;) loop as below.
for(obj = dtfirst(dt); obj; obj = dtnext(dt,obj))
That loop is literally the main character of iteration ๐ซถ
๐ dtlast, dtprev
Void_t* dtlast(Dt_t* dt)
Void_t* dtprev(Dt_t* dt, Void_t* obj)
dtlast() and dtprev() are like dtfirst() and dtnext() but work in reverse order. For Dtset, Dtbag, Dtrhset and Dtrhbag, both reverse and forward orders are the same. Note that dictionaries on a viewpath are still walked in the order of the viewpath. Backwards but make it cute ๐
โญ dtleast, dtmost
Void_t* dtleast(Dt_t* dt, Void_t* obj)
Void_t* dtmost(Dt_t* dt, Void_t* obj)
dtleast() returns the smallest object greater or equal to obj. dtmost() returns the largest object smaller or equal to obj. Again, object ordering depends on the storage method in use. For example, with Dtoset and Dtobag, the ordering of objects is well-defined and it is possible to call dtleast() or dtmost() on an object not in the dictionary and still get a meaningful result. On the other hand, with Dtset or Dtrhset, such a call will essentially be the same as dtsearch() because without matching an object, it cannot be determined what comes before or after. Boundaries but make it mystical โจ
๐ฅ dtwalk
dtwalk(Dt_t* dt, int (*userf)(Dt_t*, Void_t*, Void_t*), Void_t* data)
This function calls (*userf)(walk,obj,data) on each object in dt and other dictionaries viewable from it. walk is the dictionary containing obj. If userf() returns a <0 value, dtwalk() terminates and returns the same value. dtwalk() returns 0 on completion. A little tour through the whole friend group.
๐ dtflatten, dtlink, dtobj
Dtlink_t* dtflatten(Dt_t* dt)
Dtlink_t* dtlink(Dt_t* dt, Dtlink_t* link)
Void_t* dtobj(Dt_t* dt, Dtlink_t* link)
Using dtfirst()/dtnext() or dtlast()/dtprev() to walk a single dictionary can incur significant cost due to function calls. For efficient walking of a single directory (i.e., no viewpathing), dtflatten() and dtlink() can be used. Objects in dt are made into a linked list and walked as follows.
for(link = dtflatten(dt); link; link = dtlink(dt,link) )
Note that dtflatten() returns a list of type Dtlink_t*, not Void_t*. That is, it returns a dictionary holder pointer, not a user object pointer (although both are the same if the discipline field link is zero.) The macro function dtlink() returns the dictionary holder object following link. The macro function dtobj(dt,link) returns the user object associated with link. Beware that the flattened object list is unflattened on any dictionary operations other than dtlink(). No cap, thatโs important.
๐ธ dtextract, dtrestore
Dtlink_t* dtextract(Dt_t* dt)
Dtlink_t* dtrestore(Dt_t* dt, Dtlink_t* list)
dtextract() extracts the list of objects from dt and makes it appear empty. dtrestore() repopulates dt with a list of objects previously obtained via dtextract(). It is important that the same discipline and method are in use at both extraction and restoration. Otherwise, undefined behaviors may result. These functions return NULL on error. Extract, restore, repeat ๐ง
๐ DICTIONARY INFORMATION ๐
Dt_t* dtvnext(Dt_t* dt)โ this returns the dictionary thatdtis viewing, if any.ssize_t dtvcount(Dt_t* dt)โ this returns the number of dictionaries that viewdt.Dt_t* dtvhere(Dt_t* dt)โ this returns the dictionaryvviewable fromdtwhere an object was found from the most recent search or walk operation.ssize_t dtsize(Dt_t* dt)โ this function returns the number of objects stored indt. The population count, but make it data structures ๐
ssize_t dtstat(Dt_t *dt, Dtstat_t* st)
Okay bestie, this one is your โจ stats girlie โจ moment โ it reports dictionary statistics for dt and returns the number of objects stored in dt. That's it, that's the whole vibe check.
The info goes into st, which is a Dtstat_t, and Dtstat_t is serving these fields:
int methโ the method your dictionary is out here using, e.g.DT_SET,DT_OSET, etc. Literally just receipts on which implementation you picked ๐ .ssize_t sizeโ the number of objects in the dictionary. The headcount, the guest list, the "how many people are at this party" number ๐.ssize_t mlevโ the maximum number of levels in the data structure used for object storage, i.e., the binary tree or the recursive hash table. For a hash table with chaining (i.e.,DtsetandDtbag), it gives the length of the longest chain. So yeah, it's the "how deep does this rabbit hole go" number ๐, and for chained hash tables it's the longggest chain, no cap.ssize_t lsize[]โ the object counts at each level. For a hash table with chaining (i.e.,DtsetandDtbag), a level is defined as objects at that position in their chains. And because chains can be arbitrarily long โ like, arbitrarily, bestie, do not underestimate them โ the report is limited to objects at a level less thanDT_MAXSIZE. So it's a partial tea spill, but a valid one ๐ต.ssize_t tsize[]โ for a hash table using a trie structure, this counts the number of sub-tables at each level. For example,tsize[0]should be 1 only for this hash table type. It's giving "the root has exactly one baby table" energy ๐ฑ.
โจ HASH FUNCTIONS โจ
unsigned int dtcharhash(unsigned int h, char c)
unsigned int dtstrhash(unsigned int h, char* str, int n)
These two compute hash values from bytes or strings and honestly they're little icons of the game ๐งฎโจ.
dtcharhash()computes a new hash value from bytecand seed valueh. One byte in, one hash out, slay.dtstrhash()computes a new hash value from stringstrand seed valueh. Now here's the tea: ifnis positive,stris a byte array of lengthn; otherwise,stris a null-terminated string. Read that twice, bestie, because the behavior completely changes based onn๐ญ โ positivenmeans "I already told you the length," everything else means "find the\0yourself."
๐ง IMPLEMENTATION NOTES ๐ง
Let's do a lil tour of who's built on what, because the family tree here is fascinating:
Dtlist,DtstackandDtqueueare based on doubly linked list. Classic, timeless, iconic ๐.DtosetandDtobagare based on top-down splay trees. Fancy and self-adjusting, we love to see it ๐ณ.DtsetandDtbagare based on hash tables with move-to-front collision chains. Move-to-front is that main character energy โ recent hits jump the line ๐ .DtrhsetandDtrhbagare based on a recursive hashing data structure that avoids table resizing. No resizing?? No rehashing drama?? We stan a low-maintenance king ๐ซถ.
๐ AUTHOR ๐
Kiem-Phong Vo, kpv@research.att.com โ the legend, the moment, the whole entire author of this masterpiece ๐
And that's the page, bestie! ๐ The footer reading at the bottom says LIBCDT(3) โ so that's your source/version tag and section three, and no date is given on this one, so we're not gonna make one up ๐. Go forth and hash responsibly! ๐โจ๐
๐ฆ where this page comes from
- opensuse-leap 16.0: ksh-devel 93vu-bp160.1.33 ยท CPL-1.0
- opensuse-leap 16.0: ksh-devel 93vu-bp160.1.33 ยท CPL-1.0
- opensuse-leap 16.0: ksh-devel 93vu-bp160.1.33 ยท CPL-1.0
- opensuse-leap 16.0: ksh-devel 93vu-bp160.1.33 ยท CPL-1.0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms