InetUnderlayConfigurator.h File Reference

#include <vector>
#include <deque>
#include <set>
#include <omnetpp.h>
#include <UnderlayConfigurator.h>

Go to the source code of this file.

Classes

class  InetUnderlayConfigurator
 Configurator module for the InetUnderlay. 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)


Detailed Description

Author:
Markus Mauch, Stephan Krause, Bernhard Heep

Definition in file InetUnderlayConfigurator.h.


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

Definition at line 139 of file InetUnderlayConfigurator.h.

00140 {
00141     static std::vector<double> value;
00142     if ( (unsigned int)index >= value.size() )
00143         value.resize((int)index + 1);
00144     if ( new_calc == 1 )
00145         value[(int)index] = (double)intuniform((int)start, (int)end);
00146     return value[(int)index];
00147 };

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

Definition at line 120 of file InetUnderlayConfigurator.h.

00121 {
00122     static std::vector<double> value;
00123     if ( (unsigned int)index >= value.size() )
00124         value.resize((int)index + 1);
00125     if ( new_calc == 1 )
00126         value[(int)index] = uniform(start, end);
00127     return value[(int)index];
00128 };


Generated on Tue Sep 8 17:26:55 2009 for OverSim by  doxygen 1.5.8