wss.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  WSS

Functions

int power (int base, int j)
void rawScan (int i, int j, int N, int *p)


Function Documentation

int power int  base,
int  j
 

Definition at line 51 of file wss.h.

Referenced by rawScan().

00052 {
00053     int r=1; int i;
00054     if(j==0) return 1;
00055     else
00056     {
00057         for(i=0;i<j;i++)
00058         r*=base;
00059     }
00060 
00061     return r;
00062 }

void rawScan int  i,
int  j,
int  N,
int *  p
 

Definition at line 64 of file wss.h.

References power().

Referenced by WSS::init().

00065 {
00066     if(j==N)
00067     {
00068         *p=N;
00069         return;
00070     }
00071 
00072     if(i%(int)power(2,j))
00073     {
00074         *p=j;
00075         return;
00076     }
00077     else
00078         rawScan(i, j+1, N, p);
00079 }

Here is the call graph for this function:


Generated on Tue Mar 6 17:02:10 2007 for ns2 Network Simulator 2.29 by  doxygen 1.4.6