A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
main-random-variable.cc File Reference
#include "ns3/random-variable-stream.h"
#include "ns3/ptr.h"
#include "ns3/double.h"
#include "ns3/string.h"
#include "ns3/integer.h"
#include "ns3/gnuplot.h"
#include <map>
#include <cmath>
+ Include dependency graph for main-random-variable.cc:

Go to the source code of this file.

Functions

double dround (double number, double precision)
 Round a double number to the given precision. More...
 
static GnuplotDataset Histogramm (Ptr< RandomVariableStream > rndvar, unsigned int probes, double precision, const std::string &title, bool notcontinous=false)
 
int main (int argc, char *argv[])
 

Function Documentation

double dround ( double  number,
double  precision 
)

Round a double number to the given precision.

e.g. dround(0.234, 0.1) = 0.2 and dround(0.257, 0.1) = 0.3

Definition at line 33 of file main-random-variable.cc.

Referenced by Histogramm().

+ Here is the caller graph for this function:

static GnuplotDataset Histogramm ( Ptr< RandomVariableStream rndvar,
unsigned int  probes,
double  precision,
const std::string &  title,
bool  notcontinous = false 
)
static

Definition at line 45 of file main-random-variable.cc.

References ns3::Gnuplot2dDataset::Add(), data, dround(), ns3::RandomVariableStream::GetValue(), ns3::Gnuplot2dDataset::IMPULSES, ns3::Gnuplot2dDataset::SetStyle(), and ns3::GnuplotDataset::SetTitle().

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: