SNAP Library 4.0, Developer Reference
2017-07-27 13:18:06
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
#include <shash.h>
Public Member Functions | |
TSparseGroup () | |
TSparseGroup (TSIn &SIn) | |
TSparseGroup (const TSparseGroup &SG) | |
~TSparseGroup () | |
void | Load (TSIn &SIn) |
void | Save (TSOut &SOut) const |
TSparseGroup & | operator= (const TSparseGroup &SG) |
bool | operator== (const TSparseGroup &SG) const |
bool | operator< (const TSparseGroup &SG) const |
int | Len () const |
int | MxLen () const |
int | Reserved () const |
bool | Empty () const |
void | Clr (const bool &DoDel=true) |
int | GetGroupSize () const |
uint | GetDiskSz () const |
bool | IsEmpty (const int &ValN) const |
const TVal & | Offset (const int &Pos) const |
TVal & | Offset (const int &Pos) |
int | OffsetToPos (int Offset) const |
int | PosToOffset (int Pos) const |
const TVal & | DefVal () const |
const TVal & | Get (const int &ValN) const |
const TVal & | operator[] (const int ValN) const |
TVal & | Set (const int &ValN, const TVal &Val) |
TVal & | Set (const int &ValN) |
void | Del (const int &ValN) |
Private Member Functions | |
bool | BMTest (const int &ValN) const |
void | BMSet (const int &ValN) |
void | BMClear (const int &ValN) |
Static Private Member Functions | |
static int | CharBit (const int &ValN) |
static int | ModBit (const int &ValN) |
static int | PosToOffset (const unsigned char *BitSet, int Pos) |
Private Attributes | |
unsigned char | BitSet [(GroupSize-1)/8+1] |
uint16 | Buckets |
TVal * | Group |
|
inline |
|
inline |
Definition at line 75 of file shash.h.
References TSparseGroup< TVal, GroupSize >::Load().
TSparseGroup< TVal, GroupSize >::TSparseGroup | ( | const TSparseGroup< TVal, GroupSize > & | SG | ) |
Definition at line 141 of file shash.h.
References TSparseGroup< TVal, GroupSize >::BitSet, TSparseGroup< TVal, GroupSize >::Buckets, and TSparseGroup< TVal, GroupSize >::Group.
|
inline |
|
inlineprivate |
Definition at line 71 of file shash.h.
References TSparseGroup< TVal, GroupSize >::BitSet, TSparseGroup< TVal, GroupSize >::CharBit(), and TSparseGroup< TVal, GroupSize >::ModBit().
|
inlineprivate |
Definition at line 70 of file shash.h.
References TSparseGroup< TVal, GroupSize >::BitSet, TSparseGroup< TVal, GroupSize >::CharBit(), and TSparseGroup< TVal, GroupSize >::ModBit().
|
inlineprivate |
Definition at line 69 of file shash.h.
References TSparseGroup< TVal, GroupSize >::BitSet, TSparseGroup< TVal, GroupSize >::CharBit(), and TSparseGroup< TVal, GroupSize >::ModBit().
Referenced by TSparseGroup< TVal, GroupSize >::Get(), TSparseGroup< TVal, GroupSize >::IsEmpty(), and TSparseGroup< TVal, GroupSize >::Set().
|
inlinestaticprivate |
Definition at line 67 of file shash.h.
Referenced by TSparseGroup< TVal, GroupSize >::BMClear(), TSparseGroup< TVal, GroupSize >::BMSet(), and TSparseGroup< TVal, GroupSize >::BMTest().
void TSparseGroup< TVal, GroupSize >::Clr | ( | const bool & | DoDel = true | ) |
Definition at line 221 of file shash.h.
Referenced by TSparseHash< TKey, TDat, GroupSize >::MoveFrom().
|
inline |
Definition at line 99 of file shash.h.
Referenced by TSparseGroup< TVal, GroupSize >::Get(), and TSparseGroup< TVal, GroupSize >::Set().
void TSparseGroup< TVal, GroupSize >::Del | ( | const int & | ValN | ) |
Definition at line 247 of file shash.h.
Referenced by TSparseTable< TVal, GroupSize >::Del().
|
inline |
|
inline |
Definition at line 100 of file shash.h.
References TSparseGroup< TVal, GroupSize >::BitSet, TSparseGroup< TVal, GroupSize >::BMTest(), TSparseGroup< TVal, GroupSize >::DefVal(), TSparseGroup< TVal, GroupSize >::Group, and TSparseGroup< TVal, GroupSize >::PosToOffset().
Referenced by TSparseGroup< TVal, GroupSize >::operator[]().
|
inline |
Definition at line 91 of file shash.h.
References TSparseGroup< TVal, GroupSize >::BitSet, and TSparseGroup< TVal, GroupSize >::Buckets.
|
inline |
|
inline |
Definition at line 93 of file shash.h.
References TSparseGroup< TVal, GroupSize >::BMTest().
|
inline |
Definition at line 85 of file shash.h.
References TSparseGroup< TVal, GroupSize >::Buckets.
Referenced by TSparseHash< TKey, TDat, GroupSize >::CopyFrom(), TSparseTable< TVal, GroupSize >::Del(), TSparseHash< TKey, TDat, GroupSize >::MoveFrom(), and TSparseTable< TVal, GroupSize >::Set().
void TSparseGroup< TVal, GroupSize >::Load | ( | TSIn & | SIn | ) |
Definition at line 150 of file shash.h.
References TSIn::Load(), and TSIn::LoadBf().
Referenced by TSparseGroup< TVal, GroupSize >::TSparseGroup().
|
inlinestaticprivate |
Definition at line 68 of file shash.h.
Referenced by TSparseGroup< TVal, GroupSize >::BMClear(), TSparseGroup< TVal, GroupSize >::BMSet(), and TSparseGroup< TVal, GroupSize >::BMTest().
|
inline |
|
inline |
Definition at line 94 of file shash.h.
References TSparseGroup< TVal, GroupSize >::Group.
Referenced by TSparseHash< TKey, TDat, GroupSize >::CopyFrom(), and TSparseHash< TKey, TDat, GroupSize >::MoveFrom().
|
inline |
int TSparseGroup< TVal, GroupSize >::OffsetToPos | ( | int | Offset | ) | const |
Definition at line 206 of file shash.h.
References Assert, Fail, and TB1Def::GetBit().
bool TSparseGroup< TVal, GroupSize >::operator< | ( | const TSparseGroup< TVal, GroupSize > & | SG | ) | const |
Definition at line 196 of file shash.h.
References TSparseGroup< TVal, GroupSize >::BitSet, TSparseGroup< TVal, GroupSize >::Buckets, and TSparseGroup< TVal, GroupSize >::Group.
TSparseGroup< TVal, GroupSize > & TSparseGroup< TVal, GroupSize >::operator= | ( | const TSparseGroup< TVal, GroupSize > & | SG | ) |
Definition at line 166 of file shash.h.
References TSparseGroup< TVal, GroupSize >::BitSet, TSparseGroup< TVal, GroupSize >::Buckets, and TSparseGroup< TVal, GroupSize >::Group.
bool TSparseGroup< TVal, GroupSize >::operator== | ( | const TSparseGroup< TVal, GroupSize > & | SG | ) | const |
Definition at line 185 of file shash.h.
References TSparseGroup< TVal, GroupSize >::BitSet, TSparseGroup< TVal, GroupSize >::Buckets, and TSparseGroup< TVal, GroupSize >::Group.
|
inline |
Definition at line 102 of file shash.h.
References TSparseGroup< TVal, GroupSize >::Get().
|
staticprivate |
Definition at line 113 of file shash.h.
Referenced by TSparseGroup< TVal, GroupSize >::Get(), and TSparseGroup< TVal, GroupSize >::Set().
|
inline |
Definition at line 97 of file shash.h.
References TSparseGroup< TVal, GroupSize >::BitSet, and TSparseGroup< TVal, GroupSize >::PosToOffset().
Referenced by TSparseGroup< TVal, GroupSize >::PosToOffset().
|
inline |
void TSparseGroup< TVal, GroupSize >::Save | ( | TSOut & | SOut | ) | const |
Definition at line 159 of file shash.h.
References TSOut::Save(), and TSOut::SaveBf().
TVal & TSparseGroup< TVal, GroupSize >::Set | ( | const int & | ValN, |
const TVal & | Val | ||
) |
Definition at line 231 of file shash.h.
Referenced by TSparseGroup< TVal, GroupSize >::Set(), and TSparseTable< TVal, GroupSize >::Set().
|
inline |
Definition at line 105 of file shash.h.
References TSparseGroup< TVal, GroupSize >::BitSet, TSparseGroup< TVal, GroupSize >::BMTest(), TSparseGroup< TVal, GroupSize >::DefVal(), TSparseGroup< TVal, GroupSize >::Group, TSparseGroup< TVal, GroupSize >::PosToOffset(), and TSparseGroup< TVal, GroupSize >::Set().
|
private |
Definition at line 63 of file shash.h.
Referenced by TSparseGroup< TVal, GroupSize >::BMClear(), TSparseGroup< TVal, GroupSize >::BMSet(), TSparseGroup< TVal, GroupSize >::BMTest(), TSparseGroup< TVal, GroupSize >::Get(), TSparseGroup< TVal, GroupSize >::GetDiskSz(), TSparseGroup< TVal, GroupSize >::operator<(), TSparseGroup< TVal, GroupSize >::operator=(), TSparseGroup< TVal, GroupSize >::operator==(), TSparseGroup< TVal, GroupSize >::PosToOffset(), TSparseGroup< TVal, GroupSize >::Set(), and TSparseGroup< TVal, GroupSize >::TSparseGroup().
|
private |
Definition at line 64 of file shash.h.
Referenced by TSparseGroup< TVal, GroupSize >::Empty(), TSparseGroup< TVal, GroupSize >::GetDiskSz(), TSparseGroup< TVal, GroupSize >::Len(), TSparseGroup< TVal, GroupSize >::operator<(), TSparseGroup< TVal, GroupSize >::operator=(), TSparseGroup< TVal, GroupSize >::operator==(), and TSparseGroup< TVal, GroupSize >::TSparseGroup().
|
private |
Definition at line 65 of file shash.h.
Referenced by TSparseGroup< TVal, GroupSize >::Get(), TSparseGroup< TVal, GroupSize >::Offset(), TSparseGroup< TVal, GroupSize >::operator<(), TSparseGroup< TVal, GroupSize >::operator=(), TSparseGroup< TVal, GroupSize >::operator==(), TSparseGroup< TVal, GroupSize >::Set(), TSparseGroup< TVal, GroupSize >::TSparseGroup(), and TSparseGroup< TVal, GroupSize >::~TSparseGroup().