IPv4UnderlayConfigurator.h File Reference

#include <vector>
#include <deque>
#include <set>
#include <omnetpp.h>
#include <UnderlayConfigurator.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
00135 {
00136     static std::vector<double> value;
00137     if ( (uint)index >= value.size() )
00138         value.resize((int)index + 1);
00139     if ( new_calc == 1 )
00140         value[(int)index] = (double)intuniform((int)start, (int)end);
00141     return value[(int)index];
00142 };

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
00116 {
00117     static std::vector<double> value;
00118     if ( (uint)index >= value.size() )
00119         value.resize((int)index + 1);
00120     if ( new_calc == 1 )
00121         value[(int)index] = uniform(start, end);
00122     return value[(int)index];
00123 };


Generated on Fri Sep 19 13:05:05 2008 for ITM OverSim by  doxygen 1.5.5