|
SNAP Library 2.4, Developer Reference
2015-05-11 19:40:56
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
#include <hash.h>

Public Member Functions | |
| TStrHash () | |
| TStrHash (const PStringPool &StrPool) | |
| TStrHash (const int &Ports, const bool &_AutoSizeP=false, const PStringPool &StrPool=PStringPool()) | |
| TStrHash (const TStrHash &Hash) | |
| TStrHash (TSIn &SIn, bool PoolToo=true) | |
| void | Load (TSIn &SIn, bool PoolToo=true) |
| void | Save (TSOut &SOut, bool PoolToo=true) const |
| void | SetPool (const PStringPool &StrPool) |
| PStringPool | GetPool () const |
| TStrHash & | operator= (const TStrHash &Hash) |
| bool | Empty () const |
| int | Len () const |
| int | Reserved () const |
| int | GetPorts () const |
| bool | IsAutoSize () const |
| int | GetMxKeyIds () const |
| bool | IsKeyIdEqKeyN () const |
| int | AddKey (const char *Key) |
| int | AddKey (const TStr &Key) |
| int | AddKey (const TChA &Key) |
| int | AddDat (const char *Key, const TDat &Dat) |
| int | AddDat (const TStr &Key, const TDat &Dat) |
| int | AddDat (const TChA &Key, const TDat &Dat) |
| TDat & | AddDat (const char *Key) |
| TDat & | AddDat (const TStr &Key) |
| TDat & | AddDat (const TChA &Key) |
| TDat & | AddDatId (const char *Key) |
| TDat & | AddDatId (const TStr &Key) |
| TDat & | AddDatId (const TChA &Key) |
| const TDat & | operator[] (const int &KeyId) const |
| TDat & | operator[] (const int &KeyId) |
| const TDat & | operator() (const char *Key) const |
| const TDat & | GetDat (const char *Key) const |
| const TDat & | GetDat (const TStr &Key) const |
| TDat & | GetDat (const char *Key) |
| const TDat & | GetDat (const TStr &Key) |
| const TDat & | GetDat (const TChA &Key) |
| TDat & | GetDatId (const int &KeyId) |
| const TDat & | GetDatId (const int &KeyId) const |
| void | GetKeyDat (const int &KeyId, int &KeyO, TDat &Dat) const |
| void | GetKeyDat (const int &KeyId, const char *&Key, TDat &Dat) const |
| void | GetKeyDat (const int &KeyId, TStr &Key, TDat &Dat) const |
| void | GetKeyDat (const int &KeyId, TChA &Key, TDat &Dat) const |
| int | GetKeyId (const char *Key) const |
| int | GetKeyId (const TStr &Key) const |
| const char * | GetKey (const int &KeyId) const |
| int | GetKeyOfs (const int &KeyId) const |
| const char * | KeyFromOfs (const int &KeyO) const |
| bool | IsKey (const char *Key) const |
| bool | IsKey (const TStr &Key) const |
| bool | IsKey (const TChA &Key) const |
| bool | IsKey (const char *Key, int &KeyId) const |
| bool | IsKeyGetDat (const char *Key, TDat &Dat) const |
| bool | IsKeyGetDat (const TStr &Key, TDat &Dat) const |
| bool | IsKeyGetDat (const TChA &Key, TDat &Dat) const |
| bool | IsKeyId (const int &KeyId) const |
| int | FFirstKeyId () const |
| bool | FNextKeyId (int &KeyId) const |
| void | GetKeyV (TVec< TStr > &KeyV) const |
| void | GetStrIdV (TIntV &StrIdV) const |
| void | GetDatV (TVec< TDat > &DatV) const |
| void | GetKeyDatPrV (TVec< TPair< TStr, TDat > > &KeyDatPrV) const |
| void | GetDatKeyPrV (TVec< TPair< TDat, TStr > > &DatKeyPrV) const |
| void | Pack () |
Private Types | |
| typedef TPt< TStringPool > | PStringPool |
| typedef THashKeyDat< TInt, TDat > | THKeyDat |
| typedef TPair< TInt, TDat > | TKeyDatP |
| typedef TVec< THKeyDat > | THKeyDatV |
Private Member Functions | |
| uint | GetNextPrime (const uint &Val) const |
| void | Resize () |
| const THKeyDat & | GetHashKeyDat (const int &KeyId) const |
| THKeyDat & | GetHashKeyDat (const int &KeyId) |
Private Attributes | |
| TIntV | PortV |
| THKeyDatV | KeyDatV |
| TBool | AutoSizeP |
| TInt | FFreeKeyId |
| TInt | FreeKeys |
| PStringPool | Pool |
|
private |
|
private |
|
inline |
|
inline |
|
inline |
Definition at line 738 of file hash.h.
References TStrHash< TDat, TStringPool, THashFunc >::PortV, and TVec< TVal, TSizeTy >::PutAll().

|
inline |
Definition at line 740 of file hash.h.
References TPt< TRec >::Empty(), and TStrHash< TDat, TStringPool, THashFunc >::Pool.

|
inline |
Definition at line 743 of file hash.h.
References TSIn::LoadCs(), and TStrHash< TDat, TStringPool, THashFunc >::Pool.

|
inline |
Definition at line 766 of file hash.h.
References TStrHash< TDat, TStringPool, THashFunc >::AddKey(), and TStrHash< TDat, TStringPool, THashFunc >::KeyDatV.

|
inline |
Definition at line 767 of file hash.h.
References TStrHash< TDat, TStringPool, THashFunc >::AddKey(), TStr::CStr(), and TStrHash< TDat, TStringPool, THashFunc >::KeyDatV.

|
inline |
Definition at line 768 of file hash.h.
References TStrHash< TDat, TStringPool, THashFunc >::AddKey(), TChA::CStr(), and TStrHash< TDat, TStringPool, THashFunc >::KeyDatV.

|
inline |
Definition at line 769 of file hash.h.
References TStrHash< TDat, TStringPool, THashFunc >::AddKey(), and TStrHash< TDat, TStringPool, THashFunc >::KeyDatV.

|
inline |
Definition at line 770 of file hash.h.
References TStrHash< TDat, TStringPool, THashFunc >::AddKey(), TStr::CStr(), and TStrHash< TDat, TStringPool, THashFunc >::KeyDatV.

|
inline |
Definition at line 771 of file hash.h.
References TStrHash< TDat, TStringPool, THashFunc >::AddKey(), TChA::CStr(), and TStrHash< TDat, TStringPool, THashFunc >::KeyDatV.

|
inline |
Definition at line 772 of file hash.h.
References TStrHash< TDat, TStringPool, THashFunc >::AddKey(), and TStrHash< TDat, TStringPool, THashFunc >::KeyDatV.
Referenced by TSnap::LoadConnListStr().


|
inline |
Definition at line 773 of file hash.h.
References TStrHash< TDat, TStringPool, THashFunc >::AddKey(), TStr::CStr(), and TStrHash< TDat, TStringPool, THashFunc >::KeyDatV.

|
inline |
Definition at line 774 of file hash.h.
References TStrHash< TDat, TStringPool, THashFunc >::AddKey(), TChA::CStr(), and TStrHash< TDat, TStringPool, THashFunc >::KeyDatV.

| int TStrHash< TDat, TStringPool, THashFunc >::AddKey | ( | const char * | Key | ) |
Definition at line 870 of file hash.h.
Referenced by TStrHash< TDat, TStringPool, THashFunc >::AddDat(), TStrHash< TDat, TStringPool, THashFunc >::AddDatId(), TCoda::DumpMemberships(), TSnap::LoadEdgeListStr(), TAGMUtil::LoadEdgeListStr(), and TTimeNENet::LoadEdgeTm().

|
inline |
Definition at line 764 of file hash.h.
References TStrHash< TDat, TStringPool, THashFunc >::AddKey(), and TStr::CStr().
Referenced by TStrHash< TDat, TStringPool, THashFunc >::AddKey().


|
inline |
Definition at line 765 of file hash.h.
References TStrHash< TDat, TStringPool, THashFunc >::AddKey(), and TChA::CStr().
Referenced by TStrHash< TDat, TStringPool, THashFunc >::AddKey().


|
inline |
Definition at line 755 of file hash.h.
References TStrHash< TDat, TStringPool, THashFunc >::Len().

|
inline |
| bool TStrHash< TDat, TStringPool, THashFunc >::FNextKeyId | ( | int & | KeyId | ) | const |
|
inline |
Definition at line 781 of file hash.h.
References TStrHash< TDat, TStringPool, THashFunc >::GetKeyId(), and TStrHash< TDat, TStringPool, THashFunc >::KeyDatV.
Referenced by TStrHash< TDat, TStringPool, THashFunc >::operator()().


|
inline |
Definition at line 782 of file hash.h.
References TStr::CStr(), and TStrHash< TDat, TStringPool, THashFunc >::GetDat().
Referenced by TStrHash< TDat, TStringPool, THashFunc >::GetDat().


|
inline |
Definition at line 783 of file hash.h.
References TStrHash< TDat, TStringPool, THashFunc >::GetKeyId(), and TStrHash< TDat, TStringPool, THashFunc >::KeyDatV.

|
inline |
Definition at line 784 of file hash.h.
References TStr::CStr(), and TStrHash< TDat, TStringPool, THashFunc >::GetDat().
Referenced by TStrHash< TDat, TStringPool, THashFunc >::GetDat().


|
inline |
Definition at line 785 of file hash.h.
References TChA::CStr(), and TStrHash< TDat, TStringPool, THashFunc >::GetDat().
Referenced by TStrHash< TDat, TStringPool, THashFunc >::GetDat().


|
inline |
Definition at line 786 of file hash.h.
References TStrHash< TDat, TStringPool, THashFunc >::KeyDatV.
|
inline |
Definition at line 787 of file hash.h.
References TStrHash< TDat, TStringPool, THashFunc >::KeyDatV.
| void TStrHash< TDat, TStringPool, THashFunc >::GetDatKeyPrV | ( | TVec< TPair< TDat, TStr > > & | DatKeyPrV | ) | const |
Definition at line 948 of file hash.h.
| void TStrHash< TDat, TStringPool, THashFunc >::GetDatV | ( | TVec< TDat > & | DatV | ) | const |
Definition at line 929 of file hash.h.
References TVec< TVal, TSizeTy >::Add(), and TVec< TVal, TSizeTy >::Gen().

|
inlineprivate |
Definition at line 731 of file hash.h.
References Assert, THashKeyDat< TKey, TDat >::HashCd, and TStrHash< TDat, TStringPool, THashFunc >::KeyDatV.
Referenced by TStrHash< TDat, TStringPool, THashFunc >::GetKey(), TStrHash< TDat, TStringPool, THashFunc >::GetKeyDat(), TStrHash< TDat, TStringPool, THashFunc >::GetKeyOfs(), and TStrHash< TDat, TStringPool, THashFunc >::operator[]().

|
inlineprivate |
Definition at line 733 of file hash.h.
References Assert, THashKeyDat< TKey, TDat >::HashCd, and TStrHash< TDat, TStringPool, THashFunc >::KeyDatV.
|
inline |
Definition at line 795 of file hash.h.
References TStrHash< TDat, TStringPool, THashFunc >::GetHashKeyDat(), and TStrHash< TDat, TStringPool, THashFunc >::Pool.
Referenced by TCesna::DisplayAttrs(), TCoda::DumpMemberships(), TCesnaUtil::DumpNIDAttrHToNIDK(), and TAGMUtil::LoadEdgeListStr().


|
inline |
Definition at line 788 of file hash.h.
References THashKeyDat< TKey, TDat >::Dat, TStrHash< TDat, TStringPool, THashFunc >::GetHashKeyDat(), and THashKeyDat< TKey, TDat >::Key.

|
inline |
Definition at line 789 of file hash.h.
References THashKeyDat< TKey, TDat >::Dat, TStrHash< TDat, TStringPool, THashFunc >::GetHashKeyDat(), THashKeyDat< TKey, TDat >::Key, and TStrHash< TDat, TStringPool, THashFunc >::KeyFromOfs().

|
inline |
Definition at line 790 of file hash.h.
References THashKeyDat< TKey, TDat >::Dat, TStrHash< TDat, TStringPool, THashFunc >::GetHashKeyDat(), THashKeyDat< TKey, TDat >::Key, and TStrHash< TDat, TStringPool, THashFunc >::KeyFromOfs().

|
inline |
Definition at line 791 of file hash.h.
References THashKeyDat< TKey, TDat >::Dat, TStrHash< TDat, TStringPool, THashFunc >::GetHashKeyDat(), THashKeyDat< TKey, TDat >::Key, and TStrHash< TDat, TStringPool, THashFunc >::KeyFromOfs().

| void TStrHash< TDat, TStringPool, THashFunc >::GetKeyDatPrV | ( | TVec< TPair< TStr, TDat > > & | KeyDatPrV | ) | const |
Definition at line 937 of file hash.h.
| int TStrHash< TDat, TStringPool, THashFunc >::GetKeyId | ( | const char * | Key | ) | const |
Definition at line 896 of file hash.h.
Referenced by TStrHash< TDat, TStringPool, THashFunc >::GetDat(), TStrHash< TDat, TStringPool, THashFunc >::IsKey(), TStrHash< TDat, TStringPool, THashFunc >::IsKeyGetDat(), TAGMUtil::LoadCmtyVV(), and TCesnaUtil::LoadNIDAttrHFromNIDKH().

|
inline |
Definition at line 794 of file hash.h.
References TStr::CStr(), and TStrHash< TDat, TStringPool, THashFunc >::GetKeyId().
Referenced by TStrHash< TDat, TStringPool, THashFunc >::GetKeyId().


|
inline |
Definition at line 796 of file hash.h.
References TStrHash< TDat, TStringPool, THashFunc >::GetHashKeyDat(), and THashKeyDat< TKey, TDat >::Key.

| void TStrHash< TDat, TStringPool, THashFunc >::GetKeyV | ( | TVec< TStr > & | KeyV | ) | const |
Definition at line 913 of file hash.h.
References TVec< TVal, TSizeTy >::Add(), and TVec< TVal, TSizeTy >::Gen().

|
inline |
Definition at line 760 of file hash.h.
References TStrHash< TDat, TStringPool, THashFunc >::KeyDatV, and TVec< TVal, TSizeTy >::Len().

|
private |
Definition at line 821 of file hash.h.
References THash< TInt, TInt >::HashPrimes, and THash< TInt, TInt >::HashPrimeT.
|
inline |
|
inline |
Definition at line 758 of file hash.h.
References TVec< TVal, TSizeTy >::Len(), and TStrHash< TDat, TStringPool, THashFunc >::PortV.

| void TStrHash< TDat, TStringPool, THashFunc >::GetStrIdV | ( | TIntV & | StrIdV | ) | const |
Definition at line 921 of file hash.h.
References TVec< TVal, TSizeTy >::Add(), and TVec< TVal, TSizeTy >::Gen().

|
inline |
Definition at line 759 of file hash.h.
References TStrHash< TDat, TStringPool, THashFunc >::AutoSizeP.
|
inline |
Definition at line 799 of file hash.h.
References TStrHash< TDat, TStringPool, THashFunc >::GetKeyId().
Referenced by TStrUtil::CountWords(), TAGMUtil::LoadCmtyVV(), and TCesnaUtil::LoadNIDAttrHFromNIDKH().


|
inline |
Definition at line 800 of file hash.h.
References TStr::CStr(), and TStrHash< TDat, TStringPool, THashFunc >::GetKeyId().

|
inline |
Definition at line 801 of file hash.h.
References TChA::CStr(), and TStrHash< TDat, TStringPool, THashFunc >::GetKeyId().

|
inline |
Definition at line 802 of file hash.h.
References TStrHash< TDat, TStringPool, THashFunc >::GetKeyId().

|
inline |
Definition at line 803 of file hash.h.
References TStrHash< TDat, TStringPool, THashFunc >::GetKeyId(), and TStrHash< TDat, TStringPool, THashFunc >::KeyDatV.

|
inline |
Definition at line 804 of file hash.h.
References TStr::CStr(), TStrHash< TDat, TStringPool, THashFunc >::GetKeyId(), and TStrHash< TDat, TStringPool, THashFunc >::KeyDatV.

|
inline |
Definition at line 805 of file hash.h.
References TChA::CStr(), TStrHash< TDat, TStringPool, THashFunc >::GetKeyId(), and TStrHash< TDat, TStringPool, THashFunc >::KeyDatV.

|
inline |
Definition at line 806 of file hash.h.
References TStrHash< TDat, TStringPool, THashFunc >::KeyDatV, and TVec< TVal, TSizeTy >::Len().
Referenced by TCesnaUtil::DumpNIDAttrHToNIDK().


|
inline |
Definition at line 761 of file hash.h.
References TStrHash< TDat, TStringPool, THashFunc >::FreeKeys.
|
inline |
Definition at line 797 of file hash.h.
References TStrHash< TDat, TStringPool, THashFunc >::Pool.
Referenced by TStrHash< TDat, TStringPool, THashFunc >::GetKeyDat().

|
inline |
Definition at line 756 of file hash.h.
References TStrHash< TDat, TStringPool, THashFunc >::FreeKeys, TStrHash< TDat, TStringPool, THashFunc >::KeyDatV, and TVec< TVal, TSizeTy >::Len().
Referenced by TCesna::DisplayAttrs(), TCoda::DumpMemberships(), TStrHash< TDat, TStringPool, THashFunc >::Empty(), TAGMUtil::LoadEdgeListStr(), and TCesnaUtil::LoadNIDAttrHFromNIDKH().


|
inline |
Definition at line 745 of file hash.h.
References TStrHash< TDat, TStringPool, THashFunc >::AutoSizeP, TStrHash< TDat, TStringPool, THashFunc >::FFreeKeyId, TStrHash< TDat, TStringPool, THashFunc >::FreeKeys, TStrHash< TDat, TStringPool, THashFunc >::KeyDatV, TVec< TVal, TSizeTy >::Load(), TBool::Load(), TInt::Load(), TSIn::LoadCs(), TStrHash< TDat, TStringPool, THashFunc >::Pool, and TStrHash< TDat, TStringPool, THashFunc >::PortV.

|
inline |
Definition at line 778 of file hash.h.
References TStrHash< TDat, TStringPool, THashFunc >::GetDat().

| TStrHash< TDat, TStringPool, THashFunc > & TStrHash< TDat, TStringPool, THashFunc >::operator= | ( | const TStrHash< TDat, TStringPool, THashFunc > & | Hash | ) |
Definition at line 856 of file hash.h.
References TStrHash< TDat, TStringPool, THashFunc >::AutoSizeP, TPt< TRec >::Empty(), TStrHash< TDat, TStringPool, THashFunc >::FFreeKeyId, TStrHash< TDat, TStringPool, THashFunc >::FreeKeys, TStrHash< TDat, TStringPool, THashFunc >::KeyDatV, TStrHash< TDat, TStringPool, THashFunc >::Pool, and TStrHash< TDat, TStringPool, THashFunc >::PortV.

|
inline |
Definition at line 776 of file hash.h.
References THashKeyDat< TKey, TDat >::Dat, and TStrHash< TDat, TStringPool, THashFunc >::GetHashKeyDat().

|
inline |
Definition at line 777 of file hash.h.
References THashKeyDat< TKey, TDat >::Dat, and TStrHash< TDat, TStringPool, THashFunc >::GetHashKeyDat().

|
inline |
Definition at line 817 of file hash.h.
References TStrHash< TDat, TStringPool, THashFunc >::KeyDatV, and TVec< TVal, TSizeTy >::Pack().
Referenced by TAGMUtil::LoadEdgeListStr().


|
inline |
Definition at line 757 of file hash.h.
References TStrHash< TDat, TStringPool, THashFunc >::KeyDatV, and TVec< TVal, TSizeTy >::Reserved().

|
private |
Definition at line 833 of file hash.h.
References THashKeyDat< TKey, TDat >::HashCd, THashKeyDat< TKey, TDat >::Key, and THashKeyDat< TKey, TDat >::Next.
|
inline |
Definition at line 747 of file hash.h.
References TStrHash< TDat, TStringPool, THashFunc >::AutoSizeP, TStrHash< TDat, TStringPool, THashFunc >::FFreeKeyId, TStrHash< TDat, TStringPool, THashFunc >::FreeKeys, TStrHash< TDat, TStringPool, THashFunc >::KeyDatV, TStrHash< TDat, TStringPool, THashFunc >::Pool, TStrHash< TDat, TStringPool, THashFunc >::PortV, TVec< TVal, TSizeTy >::Save(), TPt< TRec >::Save(), TBool::Save(), TInt::Save(), and TSOut::SaveCs().

|
inline |
Definition at line 750 of file hash.h.
References TPt< TRec >::Empty(), IAssert, and TStrHash< TDat, TStringPool, THashFunc >::Pool.

|
private |
Definition at line 725 of file hash.h.
Referenced by TStrHash< TDat, TStringPool, THashFunc >::IsAutoSize(), TStrHash< TDat, TStringPool, THashFunc >::Load(), TStrHash< TDat, TStringPool, THashFunc >::operator=(), and TStrHash< TDat, TStringPool, THashFunc >::Save().
|
private |
Definition at line 726 of file hash.h.
Referenced by TStrHash< TDat, TStringPool, THashFunc >::Load(), TStrHash< TDat, TStringPool, THashFunc >::operator=(), and TStrHash< TDat, TStringPool, THashFunc >::Save().
|
private |
Definition at line 726 of file hash.h.
Referenced by TStrHash< TDat, TStringPool, THashFunc >::IsKeyIdEqKeyN(), TStrHash< TDat, TStringPool, THashFunc >::Len(), TStrHash< TDat, TStringPool, THashFunc >::Load(), TStrHash< TDat, TStringPool, THashFunc >::operator=(), and TStrHash< TDat, TStringPool, THashFunc >::Save().
|
private |
Definition at line 724 of file hash.h.
Referenced by TStrHash< TDat, TStringPool, THashFunc >::AddDat(), TStrHash< TDat, TStringPool, THashFunc >::AddDatId(), TStrHash< TDat, TStringPool, THashFunc >::GetDat(), TStrHash< TDat, TStringPool, THashFunc >::GetDatId(), TStrHash< TDat, TStringPool, THashFunc >::GetHashKeyDat(), TStrHash< TDat, TStringPool, THashFunc >::GetMxKeyIds(), TStrHash< TDat, TStringPool, THashFunc >::IsKeyGetDat(), TStrHash< TDat, TStringPool, THashFunc >::IsKeyId(), TStrHash< TDat, TStringPool, THashFunc >::Len(), TStrHash< TDat, TStringPool, THashFunc >::Load(), TStrHash< TDat, TStringPool, THashFunc >::operator=(), TStrHash< TDat, TStringPool, THashFunc >::Pack(), TStrHash< TDat, TStringPool, THashFunc >::Reserved(), and TStrHash< TDat, TStringPool, THashFunc >::Save().
|
private |
Definition at line 727 of file hash.h.
Referenced by TStrHash< TDat, TStringPool, THashFunc >::GetKey(), TStrHash< TDat, TStringPool, THashFunc >::GetPool(), TStrHash< TDat, TStringPool, THashFunc >::KeyFromOfs(), TStrHash< TDat, TStringPool, THashFunc >::Load(), TStrHash< TDat, TStringPool, THashFunc >::operator=(), TStrHash< TDat, TStringPool, THashFunc >::Save(), TStrHash< TDat, TStringPool, THashFunc >::SetPool(), and TStrHash< TDat, TStringPool, THashFunc >::TStrHash().
|
private |
Definition at line 723 of file hash.h.
Referenced by TStrHash< TDat, TStringPool, THashFunc >::GetPorts(), TStrHash< TDat, TStringPool, THashFunc >::Load(), TStrHash< TDat, TStringPool, THashFunc >::operator=(), TStrHash< TDat, TStringPool, THashFunc >::Save(), and TStrHash< TDat, TStringPool, THashFunc >::TStrHash().