avltree.h
// Copyright (c) 1999-2018 David Muse
// See the COPYING file for more information.
#ifndef RUDIMENTS_AVLTREE_H
#define RUDIMENTS_AVLTREE_H
#include <rudiments/private/avltreeincludes.h>
template <class valuetype>
class avltreenode {
public:
avltreenode(valuetype value);
~avltreenode();
valuetype getValue() const;
int32_t compare(valuetype value) const;
int32_t compare(avltreenode<valuetype> *peer) const;
avltreenode<valuetype> *getParent();
avltreenode<valuetype> *getLeftChild();
avltreenode<valuetype> *getRightChild();
uint8_t getLeftHeight();
uint8_t getRightHeight();
avltreenode<valuetype> *getPrevious();
avltreenode<valuetype> *getNext();
void print() const;
#include <rudiments/private/avltreenode.h>
};
template < class valuetype >
class avltree {
public:
avltree();
~avltree();
void insert(valuetype value);
void insert(avltreenode<valuetype> *node);
avltreenode<valuetype>
*detach(avltreenode<valuetype> *node);
bool remove(valuetype value);
bool removeAndDelete(valuetype value);
bool removeAndArrayDelete(valuetype value);
bool removeAll(valuetype value);
bool removeAllAndDelete(valuetype value);
bool removeAllAndArrayDelete(valuetype value);
bool remove(avltreenode<valuetype> *node);
bool removeAndDelete(avltreenode<valuetype> *node);
bool removeAndArrayDelete(avltreenode<valuetype> *node);
uint64_t getLength() const;
avltreenode<valuetype> *getTop();
avltreenode<valuetype> *getFirst();
avltreenode<valuetype> *getLast();
avltreenode<valuetype> *getPrevious(
avltreenode<valuetype> *node);
avltreenode<valuetype> *getNext(
avltreenode<valuetype> *node);
avltreenode<valuetype> *find(valuetype value);
avltreenode<valuetype>
*find(avltreenode<valuetype> *startnode,
valuetype value);
void clear();
void clearAndDelete();
void clearAndArrayDelete();
void print() const;
#include <rudiments/private/avltree.h>
};
#include <rudiments/private/avltreeinlines.h>
#endif
avltree
Definition: avltree.h:77
avltree::getTop
avltreenode< valuetype > * getTop()
avltree::insert
void insert(avltreenode< valuetype > *node)
avltree::getLast
avltreenode< valuetype > * getLast()
avltree::removeAndArrayDelete
bool removeAndArrayDelete(valuetype value)
avltree::removeAndDelete
bool removeAndDelete(valuetype value)
avltree::clearAndArrayDelete
void clearAndArrayDelete()
avltree::clearAndDelete
void clearAndDelete()
avltree::remove
bool remove(valuetype value)
avltree::removeAndArrayDelete
bool removeAndArrayDelete(avltreenode< valuetype > *node)
avltree::getPrevious
avltreenode< valuetype > * getPrevious(avltreenode< valuetype > *node)
avltree::insert
void insert(valuetype value)
avltree::removeAndDelete
bool removeAndDelete(avltreenode< valuetype > *node)
avltree::print
void print() const
avltree::detach
avltreenode< valuetype > * detach(avltreenode< valuetype > *node)
avltree::removeAllAndArrayDelete
bool removeAllAndArrayDelete(valuetype value)
avltree::removeAll
bool removeAll(valuetype value)
avltree::~avltree
~avltree()
avltree::remove
bool remove(avltreenode< valuetype > *node)
avltree::getNext
avltreenode< valuetype > * getNext(avltreenode< valuetype > *node)
avltree::avltree
avltree()
avltree::find
avltreenode< valuetype > * find(valuetype value)
avltree::getFirst
avltreenode< valuetype > * getFirst()
avltree::getLength
uint64_t getLength() const
avltree::removeAllAndDelete
bool removeAllAndDelete(valuetype value)
avltree::clear
void clear()
avltree::find
avltreenode< valuetype > * find(avltreenode< valuetype > *startnode, valuetype value)
avltreenode
Definition: avltree.h:11
avltreenode::print
void print() const
avltreenode::~avltreenode
~avltreenode()
avltreenode::compare
int32_t compare(avltreenode< valuetype > *peer) const
avltreenode::getParent
avltreenode< valuetype > * getParent()
avltreenode::getValue
valuetype getValue() const
avltreenode::avltreenode
avltreenode(valuetype value)
avltreenode::getPrevious
avltreenode< valuetype > * getPrevious()
avltreenode::getNext
avltreenode< valuetype > * getNext()
avltreenode::getRightChild
avltreenode< valuetype > * getRightChild()
avltreenode::getLeftHeight
uint8_t getLeftHeight()
avltreenode::getLeftChild
avltreenode< valuetype > * getLeftChild()
avltreenode::getRightHeight
uint8_t getRightHeight()
avltreenode::compare
int32_t compare(valuetype value) const