SNAP Library 2.1, Developer Reference  2013-09-25 10:47:25
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
TB4Def Class Reference

#include <bits.h>

Collaboration diagram for TB4Def:

List of all members.

Public Types

typedef uint TB4

Public Member Functions

 TB4Def ()
 ~TB4Def ()
TB4Defoperator= (const TB4Def &)

Static Public Member Functions

static int GetB4Bits (const TB4 &B4)
static uint GetP2 (const int &P2Exp)
static int GetL2 (const uint &Val)

Public Attributes

TB4B4P2T

Static Public Attributes

static const int B4Bits = 32
static const int MxP2Exp = TB4Def::B4Bits-1
static const TB4 MxB4 = 0xFFFFFFFF
static const TB4Def B4Def

Detailed Description

Definition at line 51 of file bits.h.


Member Typedef Documentation

typedef uint TB4Def::TB4

Definition at line 53 of file bits.h.


Constructor & Destructor Documentation

Definition at line 77 of file bits.cpp.

References B4Bits, and B4P2T.

              {
  B4P2T=new TB4[B4Bits+1]; B4P2T[0]=1;
  for (int BitN=1; BitN<B4Bits; BitN++){B4P2T[BitN]=TB4(2*B4P2T[BitN-1]);}
  B4P2T[B4Bits]=0;
}
TB4Def::~TB4Def ( ) [inline]

Definition at line 60 of file bits.h.

References B4P2T.

{delete[] B4P2T;}

Member Function Documentation

int TB4Def::GetB4Bits ( const TB4 B4) [static]
int TB4Def::GetL2 ( const uint Val) [static]

Definition at line 96 of file bits.cpp.

References B4Def, B4P2T, and MxP2Exp.

                                {
  int L2=0;
  while ((L2<TB4Def::MxP2Exp)&&(Val>=B4Def.B4P2T[L2])){L2++;}
  return L2-1;
}
uint TB4Def::GetP2 ( const int &  P2Exp) [static]

Definition at line 91 of file bits.cpp.

References B4Def, B4P2T, IAssert, and MxP2Exp.

Referenced by TBlobBs::GenBlockLenV().

                                  {
  IAssert((0<=P2Exp)&&(P2Exp<=TB4Def::MxP2Exp));
  return B4Def.B4P2T[P2Exp];
}

Here is the caller graph for this function:

TB4Def& TB4Def::operator= ( const TB4Def ) [inline]

Definition at line 62 of file bits.h.

References Fail.

{Fail; return *this;}

Member Data Documentation

const int TB4Def::B4Bits = 32 [static]

Definition at line 54 of file bits.h.

Referenced by TBSet::Excl(), TBSet::Gen(), TFSet::Incl(), TBSet::Incl(), and TB4Def().

const TB4Def::TB4 TB4Def::MxB4 = 0xFFFFFFFF [static]

Definition at line 56 of file bits.h.

Referenced by TB32Set::Fill(), TBSet::Fill(), and TBSet::Gen().

const int TB4Def::MxP2Exp = TB4Def::B4Bits-1 [static]

Definition at line 55 of file bits.h.

Referenced by TBlobBs::GenBlockLenV(), GetL2(), and GetP2().


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