SNAP Library 2.2, Developer Reference  2014-03-11 19:15:55
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
TB2Def Class Reference

#include <bits.h>

Collaboration diagram for TB2Def:

List of all members.

Public Types

typedef unsigned short int TB2

Public Member Functions

 TB2Def ()
 ~TB2Def ()
TB2Defoperator= (const TB2Def &)

Static Public Member Functions

static int GetB2Bits (const TB2 &B2)
static uint GetP2 (const int &P2Exp)
static int GetL2 (const TB2 &Val)

Public Attributes

TB2B2P2T

Static Public Attributes

static const int B2Bits = 16
static const int MxP2Exp = TB2Def::B2Bits-1
static const TB2 MxB2 = 0xFFFF
static const TB2Def B2Def

Detailed Description

Definition at line 29 of file bits.h.


Member Typedef Documentation

typedef unsigned short int TB2Def::TB2

Definition at line 31 of file bits.h.


Constructor & Destructor Documentation

Definition at line 46 of file bits.cpp.

References B2Bits, and B2P2T.

              {
  B2P2T=new TB2[B2Bits+1]; B2P2T[0]=1;
  for (int BitN=1; BitN<B2Bits; BitN++){B2P2T[BitN]=TB2(2*B2P2T[BitN-1]);}
  B2P2T[B2Bits]=0;
}
TB2Def::~TB2Def ( ) [inline]

Definition at line 38 of file bits.h.

References B2P2T.

{delete[] B2P2T;}

Member Function Documentation

int TB2Def::GetB2Bits ( const TB2 B2) [static]
int TB2Def::GetL2 ( const TB2 Val) [static]

Definition at line 63 of file bits.cpp.

References B2Def, B2P2T, and MxP2Exp.

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

Definition at line 58 of file bits.cpp.

References B2Def, B2P2T, IAssert, and MxP2Exp.

                                  {
  IAssert((0<=P2Exp)&&(P2Exp<=TB2Def::MxP2Exp));
  return B2Def.B2P2T[P2Exp];
}
TB2Def& TB2Def::operator= ( const TB2Def ) [inline]

Definition at line 40 of file bits.h.

References Fail.

{Fail; return *this;}

Member Data Documentation

const int TB2Def::B2Bits = 16 [static]

Definition at line 32 of file bits.h.

Referenced by TB2Def().

const TB2Def TB2Def::B2Def [static]

Definition at line 46 of file bits.h.

Referenced by GetL2(), and GetP2().

Definition at line 35 of file bits.h.

Referenced by GetL2(), GetP2(), TB2Def(), and ~TB2Def().

const TB2Def::TB2 TB2Def::MxB2 = 0xFFFF [static]

Definition at line 34 of file bits.h.

const int TB2Def::MxP2Exp = TB2Def::B2Bits-1 [static]

Definition at line 33 of file bits.h.

Referenced by GetL2(), and GetP2().


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