SNAP Library, User Reference  2012-10-02 12:56:23
SNAP, a general purpose network analysis and graph mining library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
TSparseHash< TKey, TDat, GroupSize > Class Template Reference

List of all members.

Public Types

typedef TSHashKeyDat< TKey, TDat > THashKeyDat
typedef TSparseTable
< THashKeyDat, GroupSize >
::TIter 
TIter
typedef TSparseTable
< THashKeyDat, GroupSize >
::TSGroup 
TSGroup

Public Member Functions

 TSparseHash (const int &WantedVals=0)
 TSparseHash (TSIn &SIn)
void Load (TSIn &SIn)
void Save (TSOut &SOut) const
TSparseHashoperator= (const TSparseHash &SHT)
bool operator== (const TSparseHash &SHT) const
bool operator< (const TSparseHash &SHT) const
::TSize GetMemUsed () const
TIter BegI () const
TIter EndI () const
TIter GetI (const TKey &Key) const
bool Empty () const
int Len () const
int Reserved () const
uint GetDiskSz () const
void Reserve (const int &MxVals)
void Clr (const bool &DoDel=true)
void Swap (TSparseHash &HT)
int AddKey (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
bool IsKey (const TKey &Key) const
bool IsKey (const TKey &Key, int &KeyId) const
bool IsKeyId (const int &KeyId) const
int GetRndKeyId (TRnd &Rnd=TInt::Rnd) const
const TDat & GetDat (const TKey &Key) const
TDat & GetDat (const TKey &Key)
const TDat & GetDatKeyId (const int &KeyId) const
TDat & GetDatKeyId (const int &KeyId)
void GetKeyDat (const int &KeyId, TKey &Key, TDat &Dat) const
bool IsKeyGetDat (const TKey &Key, TDat &Dat) 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

Static Public Attributes

static const float MxOccupancy = 0.8f
static const float MnOccupancy = 0.4f * 0.8f
static const int MinBuckets = 32

template<class TKey, class TDat, uint16 GroupSize = 48>
class TSparseHash< TKey, TDat, GroupSize >


Member Typedef Documentation

template<class TKey , class TDat , uint16 GroupSize = 48>
typedef TSHashKeyDat<TKey, TDat> TSparseHash< TKey, TDat, GroupSize >::THashKeyDat
template<class TKey , class TDat , uint16 GroupSize = 48>
typedef TSparseTable<THashKeyDat, GroupSize>::TIter TSparseHash< TKey, TDat, GroupSize >::TIter
template<class TKey , class TDat , uint16 GroupSize = 48>
typedef TSparseTable<THashKeyDat, GroupSize>::TSGroup TSparseHash< TKey, TDat, GroupSize >::TSGroup

Constructor & Destructor Documentation

template<class TKey , class TDat , uint16 GroupSize = 48>
TSparseHash< TKey, TDat, GroupSize >::TSparseHash ( const int &  WantedVals = 0) [inline]
template<class TKey , class TDat , uint16 GroupSize = 48>
TSparseHash< TKey, TDat, GroupSize >::TSparseHash ( TSIn SIn) [inline]

Member Function Documentation

template<class TKey , class TDat , uint16 GroupSize>
TDat & TSparseHash< TKey, TDat, GroupSize >::AddDat ( const TKey &  Key)
template<class TKey , class TDat , uint16 GroupSize>
TDat & TSparseHash< TKey, TDat, GroupSize >::AddDat ( const TKey &  Key,
const TDat &  Dat 
)
template<class TKey , class TDat , uint16 GroupSize>
int TSparseHash< TKey, TDat, GroupSize >::AddKey ( const TKey &  Key)
template<class TKey , class TDat , uint16 GroupSize = 48>
TIter TSparseHash< TKey, TDat, GroupSize >::BegI ( ) const [inline]
template<class TKey , class TDat , uint16 GroupSize = 48>
void TSparseHash< TKey, TDat, GroupSize >::Clr ( const bool &  DoDel = true) [inline]
template<class TKey , class TDat , uint16 GroupSize = 48>
bool TSparseHash< TKey, TDat, GroupSize >::Empty ( ) const [inline]
template<class TKey , class TDat , uint16 GroupSize = 48>
TIter TSparseHash< TKey, TDat, GroupSize >::EndI ( ) const [inline]
template<class TKey , class TDat , uint16 GroupSize>
const TDat & TSparseHash< TKey, TDat, GroupSize >::GetDat ( const TKey &  Key) const
template<class TKey , class TDat , uint16 GroupSize>
TDat & TSparseHash< TKey, TDat, GroupSize >::GetDat ( const TKey &  Key)
template<class TKey , class TDat , uint16 GroupSize = 48>
const TDat& TSparseHash< TKey, TDat, GroupSize >::GetDatKeyId ( const int &  KeyId) const [inline]
template<class TKey , class TDat , uint16 GroupSize = 48>
TDat& TSparseHash< TKey, TDat, GroupSize >::GetDatKeyId ( const int &  KeyId) [inline]
template<class TKey , class TDat , uint16 GroupSize>
void TSparseHash< TKey, TDat, GroupSize >::GetDatKeyPrV ( TVec< TPair< TDat, TKey > > &  DatKeyPrV) const
template<class TKey , class TDat , uint16 GroupSize>
void TSparseHash< TKey, TDat, GroupSize >::GetDatV ( TVec< TDat > &  DatV) const
template<class TKey , class TDat , uint16 GroupSize = 48>
uint TSparseHash< TKey, TDat, GroupSize >::GetDiskSz ( ) const [inline]
template<class TKey , class TDat , uint16 GroupSize = 48>
TIter TSparseHash< TKey, TDat, GroupSize >::GetI ( const TKey &  Key) const [inline]
template<class TKey , class TDat , uint16 GroupSize = 48>
const TKey& TSparseHash< TKey, TDat, GroupSize >::GetKey ( const int &  KeyId) const [inline]
template<class TKey , class TDat , uint16 GroupSize>
void TSparseHash< TKey, TDat, GroupSize >::GetKeyDat ( const int &  KeyId,
TKey &  Key,
TDat &  Dat 
) const
template<class TKey , class TDat , uint16 GroupSize>
void TSparseHash< TKey, TDat, GroupSize >::GetKeyDatPrV ( TVec< TPair< TKey, TDat > > &  KeyDatPrV) const
template<class TKey , class TDat , uint16 GroupSize = 48>
int TSparseHash< TKey, TDat, GroupSize >::GetKeyId ( const TKey &  Key) const [inline]
template<class TKey , class TDat , uint16 GroupSize>
void TSparseHash< TKey, TDat, GroupSize >::GetKeyV ( TVec< TKey > &  KeyV) const
template<class TKey , class TDat , uint16 GroupSize = 48>
::TSize TSparseHash< TKey, TDat, GroupSize >::GetMemUsed ( ) const [inline]
template<class TKey , class TDat , uint16 GroupSize = 48>
int TSparseHash< TKey, TDat, GroupSize >::GetRndKeyId ( TRnd Rnd = TInt::Rnd) const [inline]
template<class TKey , class TDat , uint16 GroupSize = 48>
bool TSparseHash< TKey, TDat, GroupSize >::IsKey ( const TKey &  Key) const [inline]
template<class TKey , class TDat , uint16 GroupSize = 48>
bool TSparseHash< TKey, TDat, GroupSize >::IsKey ( const TKey &  Key,
int &  KeyId 
) const [inline]
template<class TKey , class TDat , uint16 GroupSize>
bool TSparseHash< TKey, TDat, GroupSize >::IsKeyGetDat ( const TKey &  Key,
TDat &  Dat 
) const
template<class TKey , class TDat , uint16 GroupSize = 48>
bool TSparseHash< TKey, TDat, GroupSize >::IsKeyId ( const int &  KeyId) const [inline]
template<class TKey , class TDat , uint16 GroupSize = 48>
int TSparseHash< TKey, TDat, GroupSize >::Len ( ) const [inline]
template<class TKey , class TDat , uint16 GroupSize = 48>
void TSparseHash< TKey, TDat, GroupSize >::Load ( TSIn SIn) [inline]
template<class TKey , class TDat , uint16 GroupSize>
bool TSparseHash< TKey, TDat, GroupSize >::operator< ( const TSparseHash< TKey, TDat, GroupSize > &  SHT) const
template<class TKey , class TDat , uint16 GroupSize>
TSparseHash< TKey, TDat, GroupSize > & TSparseHash< TKey, TDat, GroupSize >::operator= ( const TSparseHash< TKey, TDat, GroupSize > &  SHT)
template<class TKey , class TDat , uint16 GroupSize>
bool TSparseHash< TKey, TDat, GroupSize >::operator== ( const TSparseHash< TKey, TDat, GroupSize > &  SHT) const
template<class TKey , class TDat , uint16 GroupSize = 48>
void TSparseHash< TKey, TDat, GroupSize >::Reserve ( const int &  MxVals) [inline]
template<class TKey , class TDat , uint16 GroupSize = 48>
int TSparseHash< TKey, TDat, GroupSize >::Reserved ( ) const [inline]
template<class TKey , class TDat , uint16 GroupSize = 48>
void TSparseHash< TKey, TDat, GroupSize >::Save ( TSOut SOut) const [inline]
template<class TKey , class TDat , uint16 GroupSize>
void TSparseHash< TKey, TDat, GroupSize >::Swap ( TSparseHash< TKey, TDat, GroupSize > &  HT)

Member Data Documentation

template<class TKey , class TDat , uint16 GroupSize = 48>
const int TSparseHash< TKey, TDat, GroupSize >::MinBuckets = 32 [static]
template<class TKey , class TDat , uint16 GroupSize = 48>
const float TSparseHash< TKey, TDat, GroupSize >::MnOccupancy = 0.4f * 0.8f [static]
template<class TKey , class TDat , uint16 GroupSize = 48>
const float TSparseHash< TKey, TDat, GroupSize >::MxOccupancy = 0.8f [static]

The documentation for this class was generated from the following file: