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
ch_array.h
Package: leda.tar.gz [view]
Upload User: gzelex
Upload Date: 2007-01-07
Package Size: 707k
Code Size: 2k
Category:
Mathimatics-Numerical algorithms
Development Platform:
MultiPlatform
- /*******************************************************************************
- +
- + LEDA-R 3.2.3
- +
- + ch_array.h
- +
- + Copyright (c) 1995 by Max-Planck-Institut fuer Informatik
- + Im Stadtwald, 66123 Saarbruecken, Germany
- + All rights reserved.
- +
- *******************************************************************************/
- #ifndef LEDA_CH_HASHING3_H
- #define LEDA_CH_HASHING3_H
- //------------------------------------------------------------------------------
- // Hashing Array with Chaining
- //
- // S. Naeher (1994)
- //
- //------------------------------------------------------------------------------
- #include <LEDA/basic.h>
- //------------------------------------------------------------------------------
- // class ch_array_elem
- //------------------------------------------------------------------------------
- class ch_array_elem
- {
- friend class ch_array;
- ch_array_elem* succ;
- GenPtr k;
- GenPtr i;
- };
- typedef ch_array_elem* ch_array_item;
- //--------------------------------------------------------------------
- // class ch_array
- //--------------------------------------------------------------------
- class ch_array
- {
- static ch_array_elem STOP;
- ch_array_elem* table;
- ch_array_elem* table_end;
- ch_array_elem* free;
- ch_array_elem* iterator;
- int table_size;
- int table_size_1;
- int shift;
- virtual int hash_fct(GenPtr) const { return 0; }
- virtual void clear_inf(GenPtr&) const { }
- virtual void copy_inf(GenPtr&) const { }
- virtual void init_inf(GenPtr&) const { }
- void init_table(int);
- void rehash();
- void destroy();
- public:
- GenPtr& access(GenPtr);
- GenPtr access(GenPtr) const;
- GenPtr lookup(GenPtr) const;
- void print();
- ch_array_item first_item() const;
- ch_array_item next_item(ch_array_item) const;
- ch_array& operator=(const ch_array&);
- ch_array(const ch_array&);
- ch_array(int n=1024);
- virtual ~ch_array() { destroy(); }
- GenPtr key(ch_array_item p) const { return p->k; }
- GenPtr inf(ch_array_item p) const { return p->i; }
- };
- #endif