Main Page   Modules   Alphabetical List   Data Structures   File List   Data Fields   Globals  

LinkedLists.h File Reference

Linked lists header. More...

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Data Structures

struct  BinaryNode
 A node in a binary tree. More...

struct  DoubleNode
 A node in a double linked list. More...

struct  IndirectNode
 A node in a linked list that additionally points to a node in another list. More...

struct  Node
 A node in a single linked list. More...


Defines

#define NbrNodes(linkedList)   FindLast(linkedList, NULL)
 Returns the number of nodes in a list. More...

#define SortedDoubleToBinary(l)   SortedDoubleToBinaryWithSize(l, NbrNodes((NodePtr)(l)));
 Transforms a double linked list into a binary tree. More...


Typedefs

typedef unsigned char UInt8
typedef signed char SInt8
typedef unsigned short UInt16
typedef signed short SInt16
typedef unsigned long UInt32
typedef signed long SInt32
typedef Node Node
 A node in a single linked list. More...

typedef NodeNodePtr
 A node in a single linked list. More...

typedef IndirectNode IndirectNode
 A node in a linked list that additionally points to a node in another list. More...

typedef IndirectNodeIndirectNodePtr
 A node in a linked list that additionally points to a node in another list. More...

typedef DoubleNode DoubleNode
 A node in a double linked list. More...

typedef DoubleNodeDoubleNodePtr
 A node in a double linked list. More...

typedef BinaryNode BinaryNode
 A node in a binary tree. More...

typedef BinaryNodeBinaryNodePtr
 A node in a binary tree. More...


Functions

UInt32 DestroyLinkedList (NodePtr linkedList, UInt8(*DestructorFunction)(NodePtr theNode))
 Destroys all elements in a linked list. More...

UInt32 FindLast (NodePtr linkedList, NodePtr *last)
 Finds the last node in a linked list. More...

NodePtr GetNthNode (NodePtr linkedList, UInt32 n)
 Finds the Nth node of a linked list. More...

NodePtr SplitAtNth (NodePtr linkedList, UInt32 n)
 Splits a linked list in two. More...

IndirectNodePtr FindAndList (NodePtr linkedList, UInt8(*IsWhatIWant)(NodePtr theNode))
 Finds nodes in a linked list based on a "matching" function. More...

NodePtr FindAndMoveOut (NodePtr *linkedListPtr, UInt8(*IsWhatIWant)(NodePtr theNode))
 Finds and removes nodes based on a "matching" function. More...

void ApplyIndirectOnSimple (IndirectNodePtr indirectList)
 Applies an indirect linked list on a linked list. More...

void InvertList (NodePtr *linkedListPtr)
 Inverses a linked list. More...

void SplitAndMergeSort (NodePtr *linkedList, SInt8(*CompareFuntion)(NodePtr a, NodePtr b))
 Sorts a linked list. More...

void InvertDoubleList (DoubleNodePtr *doubleLinkedListPtr)
 Same as InvertList, but for double linked lists, and much faster. More...

UInt32 FindFirst (DoubleNodePtr linkedList, DoubleNodePtr *first)
 Same as FindLast, but backwards with a double linked list. More...

void FillPrev (DoubleNodePtr linkedList)
 Fills the "prev" values. More...

void InsertInTree (BinaryNodePtr theNode, BinaryNodePtr *root, SInt8(*CompareFunction)(NodePtr a, NodePtr b))
 Inserts a node in a binary tree. More...

BinaryNodePtr SortedDoubleToBinaryWithSize (DoubleNodePtr linkedList, UInt32 size)
 Transforms a sorted double linked list into a binary tree. More...

DoubleNodePtr BinaryToDouble (BinaryNodePtr root, UInt8 fillPrev)
 Transforms a (sorted) binary tree to a sorted double linked list. More...

IndirectNodePtrLeftNodeRight (BinaryNodePtr node, IndirectNodePtr *theList)
 Used only for the BinaryToDouble function. More...

void BalanceTree (BinaryNodePtr *root)
 Balances a binary tree. More...

UInt8 DestroyIndirectNode (NodePtr theNode)
 Destroys an indirect node. More...


Detailed Description

Linked lists header.

This file assumes that:

If this is false, just change the typedefs correctly.

Definition in file LinkedLists.h.


Generated on Sun Dec 23 15:20:47 2001 for ANet by doxygen 1.2.12 written by Dimitri van Heesch, © 1997-2001

SourceForge
Logo