IPv4UnderlayConfigurator.h File Reference

#include <vector>
#include <omnetpp.h>
#include <BasicModule.h>
#include <deque>
#include <set>
#include <UnderlayConfigurator.h>
#include <InitStages.h>
#include <IPv4Info.h>
#include "AccessNet.h"

Classes

class  IPv4UnderlayConfigurator
 Configurator module for the IPv4Underlay. More...

Functions

double uniform2 (double start, double end, double index, double new_calc)
 Extended uniform() function.
double intuniform2 (double start, double end, double index, double new_calc)
 Extended intuniform() function.
 Define_Function (uniform2, 4)
 Define_Function (intuniform2, 4)


Function Documentation

Define_Function ( intuniform2  ,
 
)

Define_Function ( uniform2  ,
 
)

double intuniform2 ( double  start,
double  end,
double  index,
double  new_calc 
)

Extended intuniform() function.

Parameters:
start start value
end end value
index position of the new value in the static vector
new_calc '1' if a new random number should be generated
Returns:
the random number at position index in the double vector
00138 {
00139     static std::vector<double> value;
00140     if ( (uint)index >= value.size() )
00141         value.resize((int)index + 1);
00142     if ( new_calc == 1 )
00143         value[(int)index] = (double)intuniform((int)start, (int)end);
00144     return value[(int)index];
00145 };

double uniform2 ( double  start,
double  end,
double  index,
double  new_calc 
)

Extended uniform() function.

Parameters:
start start value
end end value
index position of the new value in the static vector
new_calc '1' if a new random number should be generated
Returns:
the random number at position index in the double vector
00119 {
00120     static std::vector<double> value;
00121     if ( (uint)index >= value.size() )
00122         value.resize((int)index + 1);
00123     if ( new_calc == 1 )
00124         value[(int)index] = uniform(start, end);
00125     return value[(int)index];
00126 };


Generated on Thu Apr 17 13:19:27 2008 for ITM OverSim by  doxygen 1.5.3