|
SNAP Library 3.0, User Reference
2016-07-20 17:56:49
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
Hash-Table with multiprocessing support. More...
#include <hashmp.h>
Classes | |
| class | THashMPKeyDatCmp |
Public Types | |
| enum | { HashPrimes =32 } |
| typedef THashMPKeyDatI< TKey, TDat > | TIter |
Public Member Functions | |
| THashMP () | |
| THashMP (const THashMP &PHash) | |
| THashMP (const int &ExpectVals) | |
| THashMP (TSIn &SIn) | |
| void | Load (TSIn &SIn) |
| void | Save (TSOut &SOut) const |
| THashMP & | operator= (const THashMP &Hash) |
| bool | operator== (const THashMP &Hash) const |
| const TDat & | operator[] (const int &KeyId) const |
| TDat & | operator[] (const int &KeyId) |
| TDat & | operator() (const TKey &Key) |
| ::TSize | GetMemUsed () const |
| TIter | BegI () const |
| TIter | EndI () const |
| TIter | GetI (const TKey &Key) const |
| void | Gen (const int &ExpectVals) |
| void | Clr (const bool &DoDel=true) |
| bool | Empty () const |
| int | Len () const |
| void | SetLen (const int &Length) |
| int | GetMxKeyIds () const |
| int | GetReservedKeyIds () const |
| int | AddKey (const TKey &Key) |
| int | AddKey11 (const int &Idx, const TKey &Key, bool &Found) |
| int | AddKey12 (const int &Idx, const TKey &Key, bool &Found) |
| int | AddKey13 (const int &Idx, const TKey &Key) |
| int | AddKey1 (const TKey &Key, bool &Found) |
| int | AddKey2 (const int &Idx, const TKey &Key, bool &Found) |
| TDat & | AddDatId (const TKey &Key) |
| TDat & | AddDat (const TKey &Key) |
| TDat & | AddDat (const TKey &Key, const TDat &Dat) |
| const TKey & | GetKey (const int &KeyId) const |
| int | GetKeyId (const TKey &Key) const |
| int | GetRndKeyId (TRnd &Rnd) const |
| Get an index of a random element. If the hash table has many deleted keys, this may take a long time. More... | |
| int | GetRndKeyId (TRnd &Rnd, const double &EmptyFrac) |
| Get an index of a random element. If the hash table has many deleted keys, defrag the hash table first (that's why the function is non-const). More... | |
| bool | IsKey (const TKey &Key) const |
| bool | IsKey (const TKey &Key, int &KeyId) const |
| bool | IsKeyId (const int &KeyId) const |
| const TDat & | GetDat (const TKey &Key) const |
| TDat & | GetDat (const TKey &Key) |
| void | GetKeyDat (const int &KeyId, TKey &Key, TDat &Dat) const |
| bool | IsKeyGetDat (const TKey &Key, TDat &Dat) const |
| int | FFirstKeyId () const |
| bool | FNextKeyId (int &KeyId) const |
| void | GetKeyV (TVec< TKey > &KeyV) const |
| void | GetDatV (TVec< TDat > &DatV) const |
| void | GetKeyDatPrV (TVec< TPair< TKey, TDat > > &KeyDatPrV) const |
| void | GetDatKeyPrV (TVec< TPair< TDat, TKey > > &DatKeyPrV) const |
| void | GetKeyDatKdV (TVec< TKeyDat< TKey, TDat > > &KeyDatKdV) const |
| void | GetDatKeyKdV (TVec< TKeyDat< TDat, TKey > > &DatKeyKdV) const |
| void | Swap (THashMP &Hash) |
| void | Pack () |
Static Public Attributes | |
| static const unsigned int | HashPrimeT [HashPrimes] |
Private Types | |
| typedef THashMPKeyDat< TKey, TDat > | TPHKeyDat |
| typedef TPair< TKey, TDat > | TKeyDatP |
Private Member Functions | |
| TPHKeyDat & | GetPHashKeyDat (const int &KeyId) |
| const TPHKeyDat & | GetPHashKeyDat (const int &KeyId) const |
| uint | GetNextPrime (const uint &Val) const |
Private Attributes | |
| TVec< TPHKeyDat > | Table |
| TInt | NumVals |
Hash-Table with multiprocessing support.
| typedef THashMPKeyDatI<TKey, TDat> THashMP< TKey, TDat, THashFunc >::TIter |
|
private |
| anonymous enum |
|
inline |
|
inline |
|
inlineexplicit |
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
| int THashMP< TKey, TDat, THashFunc >::AddKey | ( | const TKey & | Key | ) |
| int THashMP< TKey, TDat, THashFunc >::AddKey1 | ( | const TKey & | Key, |
| bool & | Found | ||
| ) |
| int THashMP< TKey, TDat, THashFunc >::AddKey11 | ( | const int & | Idx, |
| const TKey & | Key, | ||
| bool & | Found | ||
| ) |
| int THashMP< TKey, TDat, THashFunc >::AddKey12 | ( | const int & | Idx, |
| const TKey & | Key, | ||
| bool & | Found | ||
| ) |
| int THashMP< TKey, TDat, THashFunc >::AddKey13 | ( | const int & | Idx, |
| const TKey & | Key | ||
| ) |
| int THashMP< TKey, TDat, THashFunc >::AddKey2 | ( | const int & | Idx, |
| const TKey & | Key, | ||
| bool & | Found | ||
| ) |
|
inline |
| void THashMP< TKey, TDat, THashFunc >::Clr | ( | const bool & | DoDel = true | ) |
|
inline |
|
inline |
|
inline |
| bool THashMP< TKey, TDat, THashFunc >::FNextKeyId | ( | int & | KeyId | ) | const |
|
inline |
|
inline |
|
inline |
| void THashMP< TKey, TDat, THashFunc >::GetDatKeyKdV | ( | TVec< TKeyDat< TDat, TKey > > & | DatKeyKdV | ) | const |
Definition at line 539 of file hashmp.h.
| void THashMP< TKey, TDat, THashFunc >::GetDatKeyPrV | ( | TVec< TPair< TDat, TKey > > & | DatKeyPrV | ) | const |
Definition at line 517 of file hashmp.h.
| void THashMP< TKey, TDat, THashFunc >::GetDatV | ( | TVec< TDat > & | DatV | ) | const |
|
inline |
|
inline |
|
inline |
| void THashMP< TKey, TDat, THashFunc >::GetKeyDatKdV | ( | TVec< TKeyDat< TKey, TDat > > & | KeyDatKdV | ) | const |
Definition at line 528 of file hashmp.h.
| void THashMP< TKey, TDat, THashFunc >::GetKeyDatPrV | ( | TVec< TPair< TKey, TDat > > & | KeyDatPrV | ) | const |
Definition at line 506 of file hashmp.h.
| int THashMP< TKey, TDat, THashFunc >::GetKeyId | ( | const TKey & | Key | ) | const |
| void THashMP< TKey, TDat, THashFunc >::GetKeyV | ( | TVec< TKey > & | KeyV | ) | const |
|
inline |
|
inline |
|
private |
Definition at line 236 of file hashmp.h.
|
inlineprivate |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| bool THashMP< TKey, TDat, THashFunc >::operator== | ( | const THashMP< TKey, TDat, THashFunc > & | Hash | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void THashMP< TKey, TDat, THashFunc >::Swap | ( | THashMP< TKey, TDat, THashFunc > & | Hash | ) |
|
static |