MagickCore: splay-tree.c File Reference

# splay-tree.c File Reference

`#include "magick/studio.h"`
`#include "magick/exception.h"`
`#include "magick/exception-private.h"`
`#include "magick/log.h"`
`#include "magick/memory_.h"`
`#include "magick/splay-tree.h"`
`#include "magick/semaphore.h"`
`#include "magick/string_.h"`

## Data Structures
struct | _NodeInfo
struct | _SplayTreeInfo
## Defines
#define | MaxSplayTreeDepth 1024
## Typedefs
typedef struct _NodeInfo | NodeInfo
## Functions
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 NodeInfo * | LinkSplayTreeNodes (NodeInfo **nodes, const unsigned long low, const unsigned long high)
static int | SplayTreeToNodeArray (NodeInfo *node, const void *nodes)
static void | BalanceSplayTree (SplayTreeInfo *splay_tree)
MagickExport SplayTreeInfo * | CloneSplayTree (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)
static void * | GetFirstSplayTreeNode (SplayTreeInfo *splay_tree)
MagickExport MagickBooleanType | DeleteNodeByValueFromSplayTree (SplayTreeInfo *splay_tree, const void *value)
MagickExport MagickBooleanType | DeleteNodeFromSplayTree (SplayTreeInfo *splay_tree, const void *key)
MagickExport SplayTreeInfo * | DestroySplayTree (SplayTreeInfo *splay_tree)
MagickExport void * | GetNextKeyInSplayTree (SplayTreeInfo *splay_tree)
MagickExport void * | GetNextValueInSplayTree (SplayTreeInfo *splay_tree)
MagickExport void * | GetValueFromSplayTree (SplayTreeInfo *splay_tree, const void *key)
MagickExport unsigned long | GetNumberOfNodesInSplayTree (const SplayTreeInfo *splay_tree)
MagickExport SplayTreeInfo * | NewSplayTree (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 | ResetSplayTreeIterator (SplayTreeInfo *splay_tree)
static NodeInfo * | Splay (SplayTreeInfo *splay_tree, const unsigned long depth, const void *key, NodeInfo **node, NodeInfo **parent, NodeInfo **grandparent)

## Define Documentation

#define MaxSplayTreeDepth 1024

## Typedef Documentation

typedef struct _NodeInfo NodeInfo

## Function Documentation

MagickExport MagickBooleanType AddValueToSplayTree | ( | SplayTreeInfo * | splay_tree,
|  | const void * | key,
|  | const void * | value |
| ) |  |  |

static void BalanceSplayTree | ( | SplayTreeInfo * | splay_tree | ) | `[static]`

MagickExport SplayTreeInfo* CloneSplayTree | ( | SplayTreeInfo * | splay_tree,
|  | void *(*)(void *) | clone_key,
|  | void *(*)(void *) | clone_value |
| ) |  |  |

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 SplayTreeInfo* DestroySplayTree | ( | SplayTreeInfo * | splay_tree | ) |

static void* GetFirstSplayTreeNode | ( | SplayTreeInfo * | splay_tree | ) | `[static]`

MagickExport void* GetNextKeyInSplayTree | ( | SplayTreeInfo * | splay_tree | ) |

MagickExport void* GetNextValueInSplayTree | ( | SplayTreeInfo * | splay_tree | ) |

MagickExport unsigned long GetNumberOfNodesInSplayTree | ( | const SplayTreeInfo * | splay_tree | ) |

MagickExport void* GetValueFromSplayTree | ( | SplayTreeInfo * | splay_tree,
|  | const void * | key |
| ) |  |  |

static int IterateOverSplayTree | ( | SplayTreeInfo * | splay_tree,
|  | int(*)(NodeInfo *, const void *) | method,
|  | const void * | value |
| ) |  |  | `[static]`

static NodeInfo* LinkSplayTreeNodes | ( | NodeInfo ** | nodes,
|  | const unsigned long | low,
|  | const unsigned long | high |
| ) |  |  | `[static]`

MagickExport SplayTreeInfo* NewSplayTree | ( | int(*)(const void *, const void *) | compare,
|  | void *(*)(void *) | relinquish_key,
|  | void *(*)(void *) | relinquish_value |
| ) |  |  |

MagickExport void* RemoveNodeByValueFromSplayTree | ( | SplayTreeInfo * | splay_tree,
|  | const void * | value |
| ) |  |  |

MagickExport void* RemoveNodeFromSplayTree | ( | SplayTreeInfo * | splay_tree,
|  | const void * | key |
| ) |  |  |

MagickExport void ResetSplayTreeIterator | ( | SplayTreeInfo * | splay_tree | ) |

static NodeInfo* Splay | ( | SplayTreeInfo * | splay_tree,
|  | const unsigned long | depth,
|  | const void * | key,
|  | NodeInfo ** | node,
|  | NodeInfo ** | parent,
|  | NodeInfo ** | grandparent |
| ) |  |  | `[static]`

static void SplaySplayTree | ( | SplayTreeInfo * | splay_tree,
|  | const void * | key |
| ) |  |  | `[static]`

static int SplayTreeToNodeArray | ( | NodeInfo * | node,
|  | const void * | nodes |
| ) |  |  | `[static]`