NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
|
#include <random>
#include <ctime>
#include "plugins.hpp"
#include "../kernel.hpp"
#include "maths/parser_functions.hpp"
#include "structures.hpp"
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... | |
enum 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.
|
static |
This static function unifies the parameter detection of the random command implementation.
sCmd | const std::string& |
sLongVersion | const std::string& |
sShortVersion | const std::string& |
_parser | Parser& |
defaultVal | double |
Definition at line 45 of file plugin_random.cpp.
References mu::ParserBase::Eval(), findParameter(), getArgAtPos(), and mu::ParserBase::SetExpr().
Referenced by plugin_random().
void plugin_random | ( | std::string & | sCmd | ) |
This function is the implementation of the random command.
sCmd | std::string& |
Definition at line 87 of file plugin_random.cpp.
References _lang, date::abs(), BINOMIAL_DISTRIBUTION, Indices::col, evaluateTargetOptionInCommand(), findParameter(), GAMMA_DISTRIBUTION, Language::get(), getArgAtPos(), NumeReKernel::getInstance(), NumeReKernel::getMemoryManager(), getParameterValue(), NumeReKernel::getParser(), NumeReKernel::getSettings(), intCast(), SyntaxError::invalid_position, SyntaxError::NO_COLS, SyntaxError::NO_ROWS, NORMAL_DISTRIBUTION, POISSON_DISTRIBUTION, NumeReKernel::print(), Indices::row, VectorIndex::size(), STUDENT_DISTRIBUTION, toString(), UNIFORM_DISTRIBUTION, and MemoryManager::writeToTable().
Referenced by cmd_random().