CrissCross::Data Namespace Reference

The data structure namespace. More...


Classes

class  AVLTree
 A very fast AVL tree implementation. More...
class  BubbleSort
 A BubbleSort implementation for sorting arrays. More...
class  CombSort
 A CombSort implementation for sorting arrays. More...
class  DArray
 A dynamic array implementation. More...
class  DStack
 A dynamic stack implementation. More...
class  HashTable
 A simple HashTable. More...
class  HeapSort
 A HeapSort implementation for sorting arrays. More...
class  InsertionSort
 A InsertionSort implementation for sorting arrays. More...
class  LListNode
 A linked list node. More...
class  LList
 A doubly-linked list implementation. More...
class  SplayNode
 A binary tree node. More...
class  AVLNode
 A binary tree node used for AVLTree. More...
class  RedBlackNode
 A binary tree node used for RedBlackTree. More...
class  QuickSort
 A QuickSort implementation for sorting arrays. More...
class  RedBlackTree
 A very fast red-black tree implementation. More...
class  ShellSort
 A ShellSort implementation for sorting arrays. More...
class  Sorter
 Sorting abstract class. More...
class  SplayTree
 A splay tree implementation. More...

Enumerations

enum  AVLBalance { LEFTHEAVY, BALANCED, RIGHTHEAVY }
 The current balance status of a node. More...

Functions

template<class T >
__inline int Compare (T const &_first, T const &_second)
 Function for generic data comparison.
template<>
__inline int Compare< char * > (char *const &_first, char *const &_second)
 C-style string CrissCross::Data::Compare function.
template<>
__inline int Compare< const char * > (const char *const &_first, const char *const &_second)
 C-style string CrissCross::Data::Compare function.
template<class T >
__inline size_t Hash (T const &_data)
 Hash function for use in a HashTable.
template<>
__inline size_t Hash< char * > (char *const &_data)
 C-style string CrissCross::Data::Hash function.
template<>
__inline size_t Hash< const char * > (const char *const &_data)
 C-style string CrissCross::Data::Hash function.
template<>
__inline size_t Hash< std::string > (std::string const &_data)
 An STL string CrissCross::Data::Hash function.


Detailed Description

The data structure namespace.

Contains basic data structures to assist in sorting and searching for data.


Enumeration Type Documentation

enum AVLBalance

The current balance status of a node.

Enumerator:
LEFTHEAVY  The left side of the tree is heaviest.
BALANCED  The tree is well balanced.
RIGHTHEAVY  The right side of the tree is heaviest.


Function Documentation

__inline int CrissCross::Data::Compare ( T const &  _first,
T const &  _second 
) [inline]

Function for generic data comparison.

Can compare any class with the less-than and greater-than operators, as well as C-style strings.

Parameters:
_first The item to compare to _second. Must have comparison operators > and < implemented.
_second The item to compare to _first. Must have comparison operators > and < implemented.
Returns:
0 if the items are equal, -1 if _first is less than _second, and 1 if _first is greater than _second.

Referenced by ShellSort< T >::Sort(), QuickSort< T >::Sort(), InsertionSort< T >::Sort(), HeapSort< T >::Sort(), CombSort< T >::Sort(), and BubbleSort< T >::Sort().

__inline size_t CrissCross::Data::Hash ( T const &  _data  )  [inline]

Hash function for use in a HashTable.

Can hash any primitive type as well as C-style strings and STL strings.

Parameters:
_data The data to hash.
Returns:
Hash of the data provided.


Generated on Sun Feb 8 11:09:59 2009 for CrissCross by  doxygen 1.5.8