TExMap


class description - source file - inheritance tree

class TExMap : public TObject

    private:
void Expand(Int_t newsize) Int_t FindElement(ULong_t hash, Long_t key) void FixCollisions(Int_t index) Bool_t HighWaterMark() public:
TExMap TExMap(Int_t mapSize = 100) TExMap TExMap(const TExMap& map) virtual void ~TExMap() void Add(ULong_t hash, Long_t key, Long_t value) void Add(Long_t key, Long_t value) Int_t Capacity() const static TClass* Class() virtual void Delete(Option_t* opt) Int_t GetSize() const Long_t GetValue(ULong_t hash, Long_t key) Long_t GetValue(Long_t key) virtual TClass* IsA() const Long_t& operator()(ULong_t hash, Long_t key) Long_t& operator()(Long_t key) void Remove(ULong_t hash, Long_t key) void Remove(Long_t key) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members

    private:
TExMap::Assoc_t** fTable Int_t fSize Int_t fTally

Class Description

                                                                      
 TExMap                                                               
                                                                      
 This class stores a (key,value) pair using an external hash.         
 The (key,value) are Long_t's and therefore can contain object        
 pointers or any longs. The map uses an open addressing hashing       
 method (linear probing).                                             
                                                                      


TExMap(Int_t mapSize)
 Create a TExMap.

TExMap(const TExMap &map) : TObject(map)
 Copy constructor.

~TExMap()
 Delete TExMap.

void Add(ULong_t hash, Long_t key, Long_t value)
 Add an (key,value) pair to the table. The key should be unique.

void Delete(Option_t *)
 Delete all entries stored in the TExMap.

Long_t GetValue(ULong_t hash, Long_t key)
 Return the value belonging to specified key and hash value. If key not
 found return 0.

void Remove(ULong_t hash, Long_t key)
 Remove entry with specified key from the TExMap.

Int_t FindElement(ULong_t hash, Long_t key)
 Find an entry with specified hash and key in the TExMap.
 Returns the slot of the key or the next empty slot.

void FixCollisions(Int_t index)
 Rehash the map in case an entry has been removed.

void Expand(Int_t newSize)
 Expand the TExMap.



Inline Functions


             Bool_t HighWaterMark()
               void Add(Long_t key, Long_t value)
              Int_t Capacity() const
              Int_t GetSize() const
             Long_t GetValue(Long_t key)
               void Remove(Long_t key)
            Long_t& operator()(ULong_t hash, Long_t key)
            Long_t& operator()(Long_t key)
            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)
               void StreamerNVirtual(TBuffer& b)


Author: Fons Rademakers 26/05/99
Last update: root/cont:$Name: $:$Id: TExMap.cxx,v 1.4 2002/05/18 08:43:30 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.