#include "InetUnderlayConfigurator.h"
#include <GlobalNodeList.h>
#include <TransportAddress.h>
#include <StringConvert.h>
#include <AccessNet.h>
#include <IRoutingTable.h>
#include <RoutingTable6.h>
#include <IInterfaceTable.h>
#include <IPAddressResolver.h>
#include <IPv4InterfaceData.h>
#include <IPv6InterfaceData.h>
#include <NotificationBoard.h>
#include <InetInfo.h>
Go to the source code of this file.
Detailed Description
- Author
- Markus Mauch, Stephan Krause, Bernhard Heep
Definition in file InetUnderlayConfigurator.cc.
Function Documentation
Define_NED_Math_Function |
( |
uniform2 |
, |
|
|
4 |
|
|
) |
| |
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 642 of file InetUnderlayConfigurator.cc.
{
static std::vector<double> value;
if ( (unsigned int)index >= value.size() )
value.resize((int)index + 1);
if ( new_calc == 1 )
value[(int)index] = (double)intuniform((int)start, (int)end);
return value[(int)index];
};
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 623 of file InetUnderlayConfigurator.cc.
{
static std::vector<double> value;
if ( (unsigned int)index >= value.size() )
value.resize((int)index + 1);
if ( new_calc == 1 )
value[(int)index] = uniform(start, end);
return value[(int)index];
};