Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
rb_tree.h
Package: leda.tar.gz [view]
Upload User: gzelex
Upload Date: 2007-01-07
Package Size: 707k
Code Size: 1k
Category:
Mathimatics-Numerical algorithms
Development Platform:
MultiPlatform
- /*******************************************************************************
- +
- + LEDA-R 3.2.3
- +
- + rb_tree.h
- +
- + Copyright (c) 1995 by Max-Planck-Institut fuer Informatik
- + Im Stadtwald, 66123 Saarbruecken, Germany
- + All rights reserved.
- +
- *******************************************************************************/
- #ifndef LEDA_RB_TREE_H
- #define LEDA_RB_TREE_H
- //------------------------------------------------------------------------------
- //
- // rb_tree: red black trees (leaf oriented & doubly linked)
- //
- // derived from class "bin_tree"
- //
- // Stefan N"aher (1993)
- //
- //------------------------------------------------------------------------------
- #include <LEDA/basic.h>
- #include <LEDA/impl/bin_tree.h>
- typedef bin_tree_node* rb_tree_item;
- // ----------------------------------------------------------------
- // class rb_tree
- // ----------------------------------------------------------------
- class rb_tree : public bin_tree
- {
- enum color { red = 0, black = 1 };
- int root_balance() { return black; }
- int node_balance() { return red; }
- int leaf_balance() { return black; }
- void insert_rebal(rb_tree_item);
- void del_rebal(rb_tree_item, rb_tree_item);
- public:
- rb_tree() {}
- ~rb_tree() {}
- rb_tree(const rb_tree& T) : bin_tree(T) {}
- rb_tree& operator=(const rb_tree& T)
- { bin_tree::operator=(T); return *this; }
- };
- #endif