A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
main-random-variable-stream.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-stream.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-stream.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-stream.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:

int main ( int  argc,
char *  argv[] 
)
Todo:
Turn this plot back on once its distribution has been finished.
Todo:
Turn this plot back on once its distribution has been finished.

Definition at line 74 of file main-random-variable-stream.cc.

References ns3::Gnuplot::AddDataset(), ns3::GnuplotCollection::AddPlot(), ns3::Gnuplot::AppendExtra(), ns3::GnuplotCollection::GenerateOutput(), Histogramm(), ns3::ObjectBase::SetAttribute(), ns3::GnuplotCollection::SetTerminal(), ns3::Gnuplot::SetTitle(), and sample-rng-plot::x.

+ Here is the call graph for this function: