SNAP Library, User Reference
2012-10-15 15:06:59
SNAP, a general purpose network analysis and graph mining library
|
Go to the source code of this file.
Classes | |
class | TB1Def |
class | TB2Def |
class | TB4Def |
class | TFSet |
class | TB8Set |
class | TB32Set |
Typedefs | |
typedef TVec< TB8Set > | TB8SetV |
typedef TVec< TB32Set > | TB32SetV |
Functions | |
void | SetLastB4 () |
TBSet () | |
TBSet (const TBSet &BSet) | |
PBSet | Clone () const |
TBSet (const int &_Bits) | |
static PBSet | New (const int &Bits) |
~TBSet () | |
TBSet (TSIn &SIn) | |
static PBSet | Load (TSIn &SIn) |
void | Save (TSOut &SOut) const |
TBSet & | operator= (const TBSet &BSet) |
bool | operator== (const TBSet &BSet) const |
void | Gen (const int &_Bits) |
void | Clr () |
void | Fill () |
void | Incl (const int &BitN) |
void | Excl (const int &BitN) |
bool | In (const int &BitN) const |
void | SetBit (const int &BitN, const bool &Bool) |
bool | GetBit (const int &BitN) const |
void | SwitchBit (const int &BitN) |
int | GetBits () const |
int | Get1s () |
int | Get0s () |
uint64 | GetUInt64 () const |
void | Wr () |
TBSet & | operator~ () |
TBSet & | operator&= (const TBSet &BSet) |
TBSet & | operator|= (const TBSet &BSet) |
TBSet & | operator|= (const int &BitN) |
TBSet & | operator^= (const TBSet &BSet) |
TBSet | operator~ (const TBSet &BSet) |
TBSet | operator& (const TBSet &LBSet, const TBSet &RBSet) |
TBSet | operator| (const TBSet &LBSet, const TBSet &RBSet) |
TBSet | operator^ (const TBSet &LBSet, const TBSet &RBSet) |
TBSet | operator& (const TBSet &LBSet, const int &BitN) |
TBSet | operator| (const TBSet &LBSet, const int &BitN) |
TBSet | operator^ (const TBSet &LBSet, const int &BitN) |
Variables | |
ClassTPV(TBSet, PBSet, TBSetV) private TB4Def::TB4 | LastB4Mask |
TB4Def::TB4 * | B4T |
void Excl | ( | const int & | BitN | ) |
Definition at line 346 of file bits.h.
{ Assert((0<=BitN)&&(BitN<Bits)); B4T[BitN/TB4Def::B4Def.B4Bits]&= ~TB4Def::B4Def.B4P2T[BitN%TB4Def::B4Def.B4Bits];}
void Fill | ( | ) |
void Gen | ( | const int & | _Bits | ) |
int Get1s | ( | ) |
bool GetBit | ( | const int & | BitN | ) | const |
Definition at line 356 of file bits.h.
{ Assert((0<=BitN)&&(BitN<Bits)); return (B4T[BitN/TB4Def::B4Def.B4Bits] & TB4Def::B4Def.B4P2T[BitN%TB4Def::B4Def.B4Bits])!=0;}
bool In | ( | const int & | BitN | ) | const |
Definition at line 350 of file bits.h.
{ Assert((0<=BitN)&&(BitN<Bits)); return (B4T[BitN/TB4Def::B4Def.B4Bits] & TB4Def::B4Def.B4P2T[BitN%TB4Def::B4Def.B4Bits])!=0;}
void Incl | ( | const int & | BitN | ) |
Definition at line 342 of file bits.h.
{ Assert((0<=BitN)&&(BitN<Bits)); B4T[BitN/TB4Def::B4Def.B4Bits]|= TB4Def::B4Def.B4P2T[BitN%TB4Def::B4Def.B4Bits];}
static PBSet New | ( | const int & | Bits | ) | [static] |
bool operator== | ( | const TBSet & | BSet | ) | const |
TBSet& operator|= | ( | const int & | BitN | ) |
Definition at line 330 of file bits.h.
{ SOut.Save(B4s); SOut.Save(Bits); SOut.SaveBf(&LastB4Mask, sizeof(TB4Def::TB4)); SOut.SaveBf(B4T, B4s*sizeof(TB4Def::TB4));}
void SetBit | ( | const int & | BitN, |
const bool & | Bool | ||
) |
void SetLastB4 | ( | ) |
Definition at line 316 of file bits.h.
{B4T[B4s-1]&=LastB4Mask;}
void SwitchBit | ( | const int & | BitN | ) |
TBSet | ( | ) |
Definition at line 318 of file bits.h.
: B4s(0), Bits(0), LastB4Mask(0), B4T(NULL){}
TBSet::TBSet | ( | const TBSet & | BSet | ) |
TBSet | ( | const int & | _Bits | ) |
Definition at line 321 of file bits.h.
: B4s(0), Bits(0), LastB4Mask(0), B4T(NULL){Gen(_Bits);}
Definition at line 325 of file bits.h.
{ SIn.Load(B4s); SIn.Load(Bits); SIn.LoadBf(&LastB4Mask, sizeof(TB4Def::TB4)); B4T=(TB4Def::TB4*)SIn.LoadNewBf(B4s*sizeof(TB4Def::TB4));}
void Wr | ( | ) |
ClassTPV (TBSet, PBSet, TBSetV) private TB4Def::TB4 LastB4Mask |