MagickCore 7.1.0
Convert, Edit, Or Compose Bitmap Images
splay-tree.c File Reference
Include dependency graph for splay-tree.c:

Go to the source code of this file.

Data Structures

struct  _NodeInfo
struct  _SplayTreeInfo


#define MaxSplayTreeDepth   1024


typedef struct _NodeInfo NodeInfo


static int IterateOverSplayTree (SplayTreeInfo *, int(*)(NodeInfo *, const void *), const void *)
static void SplaySplayTree (SplayTreeInfo *, const void *)
MagickExport MagickBooleanType AddValueToSplayTree (SplayTreeInfo *splay_tree, const void *key, const void *value)
static NodeInfoLinkSplayTreeNodes (NodeInfo **nodes, const size_t low, const size_t high)
static int SplayTreeToNodeArray (NodeInfo *node, const void *nodes)
static void BalanceSplayTree (SplayTreeInfo *splay_tree)
static void * GetFirstSplayTreeNode (SplayTreeInfo *splay_tree)
MagickExport SplayTreeInfoCloneSplayTree (SplayTreeInfo *splay_tree, void *(*clone_key)(void *), void *(*clone_value)(void *))
MagickExport int CompareSplayTreeString (const void *target, const void *source)
MagickExport int CompareSplayTreeStringInfo (const void *target, const void *source)
MagickExport MagickBooleanType DeleteNodeByValueFromSplayTree (SplayTreeInfo *splay_tree, const void *value)
MagickExport MagickBooleanType DeleteNodeFromSplayTree (SplayTreeInfo *splay_tree, const void *key)
MagickExport SplayTreeInfoDestroySplayTree (SplayTreeInfo *splay_tree)
MagickExport const void * GetNextKeyInSplayTree (SplayTreeInfo *splay_tree)
MagickExport const void * GetNextValueInSplayTree (SplayTreeInfo *splay_tree)
MagickExport const void * GetRootValueFromSplayTree (SplayTreeInfo *splay_tree)
MagickExport const void * GetValueFromSplayTree (SplayTreeInfo *splay_tree, const void *key)
MagickExport size_t GetNumberOfNodesInSplayTree (const SplayTreeInfo *splay_tree)
MagickExport SplayTreeInfoNewSplayTree (int(*compare)(const void *, const void *), void *(*relinquish_key)(void *), void *(*relinquish_value)(void *))
MagickExport void * RemoveNodeByValueFromSplayTree (SplayTreeInfo *splay_tree, const void *value)
MagickExport void * RemoveNodeFromSplayTree (SplayTreeInfo *splay_tree, const void *key)
MagickExport void ResetSplayTree (SplayTreeInfo *splay_tree)
MagickExport void ResetSplayTreeIterator (SplayTreeInfo *splay_tree)
static NodeInfoSplay (SplayTreeInfo *splay_tree, const size_t depth, const void *key, NodeInfo **node, NodeInfo **parent, NodeInfo **grandparent)

Macro Definition Documentation

◆ MaxSplayTreeDepth

#define MaxSplayTreeDepth   1024

Definition at line 65 of file splay-tree.c.

Typedef Documentation

◆ NodeInfo

typedef struct _NodeInfo NodeInfo

Function Documentation

◆ AddValueToSplayTree()

◆ BalanceSplayTree()

◆ CloneSplayTree()

◆ CompareSplayTreeString()

◆ CompareSplayTreeStringInfo()

MagickExport int CompareSplayTreeStringInfo ( const void *  target,
const void *  source 

Definition at line 448 of file splay-tree.c.

References CompareStringInfo().

◆ DeleteNodeByValueFromSplayTree()

◆ DeleteNodeFromSplayTree()

◆ DestroySplayTree()

◆ GetFirstSplayTreeNode()

static void * GetFirstSplayTreeNode ( SplayTreeInfo splay_tree)

◆ GetNextKeyInSplayTree()

◆ GetNextValueInSplayTree()

◆ GetNumberOfNodesInSplayTree()

◆ GetRootValueFromSplayTree()

◆ GetValueFromSplayTree()

◆ IterateOverSplayTree()

static int IterateOverSplayTree ( SplayTreeInfo splay_tree,
int(*)(NodeInfo *, const void *)  method,
const void *  value 

◆ LinkSplayTreeNodes()

static NodeInfo * LinkSplayTreeNodes ( NodeInfo **  nodes,
const size_t  low,
const size_t  high 

Definition at line 247 of file splay-tree.c.

References _NodeInfo::left, LinkSplayTreeNodes(), and _NodeInfo::right.

Referenced by BalanceSplayTree(), and LinkSplayTreeNodes().

◆ NewSplayTree()

◆ RemoveNodeByValueFromSplayTree()

◆ RemoveNodeFromSplayTree()

◆ ResetSplayTree()

◆ ResetSplayTreeIterator()

◆ Splay()

static NodeInfo * Splay ( SplayTreeInfo splay_tree,
const size_t  depth,
const void *  key,
NodeInfo **  node,
NodeInfo **  parent,
NodeInfo **  grandparent 

◆ SplaySplayTree()

◆ SplayTreeToNodeArray()

static int SplayTreeToNodeArray ( NodeInfo node,
const void *  nodes 

Definition at line 269 of file splay-tree.c.

Referenced by BalanceSplayTree().