35 if (mapSize < 4) mapSize = 5;
39 case 5:
fSize = 5;
break;
40 case 503:
fSize = 503;
break;
93 if (!
fTable[slot].InUse()) {
101 Error(
"Add",
"key %lld is not unique", key);
121 if (!
fTable[slot].InUse()) {
143 Error(
"operator()",
"fTable==0, should never happen");
148 if (!
fTable[slot].InUse()) {
180 Int_t firstSlot = slot;
182 if (!
fTable[slot].InUse())
return 0;
184 if (++slot ==
fSize) slot = 0;
185 }
while (firstSlot != slot);
187 Error(
"GetValue",
"table full");
199 if (!
fTable) { slot = 0;
return 0; }
205 if (!
fTable[slot].InUse())
return 0;
208 }
while (firstSlot != slot);
210 Error(
"GetValue",
"table full");
224 Error(
"Remove",
"key %lld not found at %d", key, i);
243 Int_t firstSlot = slot;
245 if (!
fTable[slot].InUse())
return slot;
246 if (key ==
fTable[slot].fKey)
return slot;
247 if (++slot ==
fSize) slot = 0;
248 }
while (firstSlot != slot);
250 Error(
"FindElement",
"table full");
259 Int_t oldIndex, nextIndex;
262 for (oldIndex =
index+1; ;oldIndex++) {
263 if (oldIndex >=
fSize)
265 nextObject =
fTable[oldIndex];
266 if (!nextObject.
InUse())
269 if (nextIndex != oldIndex) {
270 fTable[nextIndex] = nextObject;
287 for (i = newSize; --i >= 0;) {
292 for (i = 0; i < oldsize; i++)
293 if (oldTable[i].InUse()) {
295 if (!
fTable[slot].InUse())
296 fTable[slot] = oldTable[i];
298 Error(
"Expand",
"slot %d not empty (should never happen)", slot);
324 for (i = 0; i < tally; ++i) {
335 }
else if (R__v >= 2) {
344 for (i = 0; i < tally; ++i) {
361 for (i = 0; i <
n; i++) {
376 for (i=0; i <
fSize; i++) {
377 if (!
fTable[i].InUse())
continue;
383 b.SetByteCount(R__c,
kTRUE);
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
unsigned long long ULong64_t
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Buffer base class used for serializing objects.
TExMapIter(const TExMap *map)
Create TExMap iterator.
Bool_t Next(ULong64_t &hash, Long64_t &key, Long64_t &value)
Get next entry from TExMap. Returns kFALSE at end of map.
TExMapIter & operator=(const TExMapIter &)
Overloaded assignment operator.
This class stores a (key,value) pair using an external hash.
Long64_t & operator()(ULong64_t hash, Long64_t key)
Return a reference to the value belonging to the key with the specified hash value.
void Expand(Int_t newsize)
Expand the TExMap.
void Streamer(TBuffer &) override
Stream all objects in the collection to or from the I/O buffer.
Int_t FindElement(ULong64_t hash, Long64_t key)
Find an entry with specified hash and key in the TExMap.
void Remove(ULong64_t hash, Long64_t key)
Remove entry with specified key from the TExMap.
void FixCollisions(Int_t index)
Rehash the map in case an entry has been removed.
void Add(ULong64_t hash, Long64_t key, Long64_t value)
Add an (key,value) pair to the table. The key should be unique.
TExMap & operator=(const TExMap &)
Assignment operator.
TExMap(Int_t mapSize=100)
Create a TExMap.
TClass * IsA() const override
Long64_t GetValue(ULong64_t hash, Long64_t key)
Return the value belonging to specified key and hash value.
void AddAt(UInt_t slot, ULong64_t hash, Long64_t key, Long64_t value)
Add an (key,value) pair to the table.
void Delete(Option_t *opt="") override
Delete all entries stored in the TExMap.
Mother of all ROOT objects.
TObject & operator=(const TObject &rhs)
TObject assignment operator.
virtual void Streamer(TBuffer &)
Stream an object of class TObject.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Long_t NextPrime(Long_t x)
ULong64_t GetHash() const
void SetHash(ULong64_t h)