SNAP Library 4.0, User Reference  2017-07-27 13:18:06
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TB2Def Class Reference

#include <bits.h>

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


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

TB2Def::TB2Def ( )

Definition at line 46 of file bits.cpp.

46  {
47  B2P2T=new TB2[B2Bits+1]; B2P2T[0]=1;
48  for (int BitN=1; BitN<B2Bits; BitN++){B2P2T[BitN]=TB2(2*B2P2T[BitN-1]);}
49  B2P2T[B2Bits]=0;
50 }
unsigned short int TB2
Definition: bits.h:31
static const int B2Bits
Definition: bits.h:32
TB2 * B2P2T
Definition: bits.h:35
TB2Def::~TB2Def ( )

Definition at line 38 of file bits.h.

38 {delete[] B2P2T;}
TB2 * B2P2T
Definition: bits.h:35

Member Function Documentation

int TB2Def::GetB2Bits ( const TB2 B2)

Definition at line 52 of file bits.cpp.

52  {
53  return
56 }
int * B1BitsT
Definition: bits.h:12
static const TB1 MxB1
Definition: bits.h:10
static const int B1Bits
Definition: bits.h:8
static const TB1Def B1Def
Definition: bits.h:24
int TB2Def::GetL2 ( const TB2 Val)

Definition at line 63 of file bits.cpp.

63  {
64  int L2=0;
65  while ((L2<TB2Def::MxP2Exp)&&(Val>=B2Def.B2P2T[L2])){L2++;}
66  return L2-1;
67 }
static const int MxP2Exp
Definition: bits.h:33
TB2 * B2P2T
Definition: bits.h:35
static const TB2Def B2Def
Definition: bits.h:46
uint TB2Def::GetP2 ( const int &  P2Exp)

Definition at line 58 of file bits.cpp.

58  {
59  IAssert((0<=P2Exp)&&(P2Exp<=TB2Def::MxP2Exp));
60  return B2Def.B2P2T[P2Exp];
61 }
#define IAssert(Cond)
Definition: bd.h:262
static const int MxP2Exp
Definition: bits.h:33
TB2 * B2P2T
Definition: bits.h:35
static const TB2Def B2Def
Definition: bits.h:46
TB2Def& TB2Def::operator= ( const TB2Def )

Definition at line 40 of file bits.h.

40 {Fail; return *this;}
#define Fail
Definition: bd.h:238

Member Data Documentation

const int TB2Def::B2Bits =16

Definition at line 32 of file bits.h.

const TB2Def TB2Def::B2Def

Definition at line 46 of file bits.h.

TB2* TB2Def::B2P2T

Definition at line 35 of file bits.h.

const TB2Def::TB2 TB2Def::MxB2 =0xFFFF

Definition at line 34 of file bits.h.

const int TB2Def::MxP2Exp =TB2Def::B2Bits-1

Definition at line 33 of file bits.h.

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