NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
plugin_random.cpp File Reference
#include <random>
#include <ctime>
#include "plugins.hpp"
#include "../kernel.hpp"
#include "maths/parser_functions.hpp"
#include "structures.hpp"
Include dependency graph for plugin_random.cpp:

Go to the source code of this file.

Enumerations

enum  RandomDistribution {
  NORMAL_DISTRIBUTION , POISSON_DISTRIBUTION , GAMMA_DISTRIBUTION , UNIFORM_DISTRIBUTION ,
  BINOMIAL_DISTRIBUTION , STUDENT_DISTRIBUTION
}
 This enumeration defines all available random distributions. More...
 

Functions

static double getParameterValue (const std::string &sCmd, const std::string &sLongVersion, const std::string &sShortVersion, Parser &_parser, double defaultVal)
 This static function unifies the parameter detection of the random command implementation. More...
 
void plugin_random (std::string &sCmd)
 This function is the implementation of the random command. More...
 

Enumeration Type Documentation

◆ RandomDistribution

This enumeration defines all available random distributions.

Enumerator
NORMAL_DISTRIBUTION 
POISSON_DISTRIBUTION 
GAMMA_DISTRIBUTION 
UNIFORM_DISTRIBUTION 
BINOMIAL_DISTRIBUTION 
STUDENT_DISTRIBUTION 

Definition at line 68 of file plugin_random.cpp.

Function Documentation

◆ getParameterValue()

static double getParameterValue ( const std::string &  sCmd,
const std::string &  sLongVersion,
const std::string &  sShortVersion,
Parser _parser,
double  defaultVal 
)
static

This static function unifies the parameter detection of the random command implementation.

Parameters
sCmdconst std::string&
sLongVersionconst std::string&
sShortVersionconst std::string&
_parserParser&
defaultValdouble
Returns
double

Definition at line 45 of file plugin_random.cpp.

References mu::ParserBase::Eval(), findParameter(), getArgAtPos(), and mu::ParserBase::SetExpr().

Referenced by plugin_random().

Here is the call graph for this function:

◆ plugin_random()

void plugin_random ( std::string &  sCmd)