|
NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
|
#include <vector>#include "plugins.hpp"#include "maths/parser_functions.hpp"#include "maths/student_t.hpp"#include "../kernel.hpp"Go to the source code of this file.
Enumerations | |
| enum | StatsFields { STATS_AVG , STATS_STD , STATS_CONFINT , STATS_STDERR , STATS_MED , STATS_Q1 , STATS_Q3 , STATS_RMS , STATS_SKEW , STATS_EXC , STATS_MIN , STATS_MAX , STATS_NUM , STATS_CNT , STATS_S_T , STATS_FIELD_COUNT } |
| This enumeration defines the available statistical values in the vector returned from calcStats(). More... | |
Functions | |
| static std::vector< std::vector< double > > | calcStats (MemoryManager &_data, const std::string &sTable) |
| This static function calculates the statistical values for all columns in the passed table and returns them as a vector array. More... | |
| static std::string | getStatFieldName (int nStatField) |
| This static function maps the statistical value enumerators to strings used for the tables and the return value. More... | |
| static void | createStatsFile (Output &_out, const std::vector< std::vector< double > > &vStats, const std::string &sSavePath, MemoryManager &_data, const std::string &sTable, const Settings &_option) |
| This static function will create the output file using the functionalities of the Output class. More... | |
| static void | createStatsOutput (Output &_out, const std::vector< std::vector< double > > &vStats, const std::string &sSavePath, MemoryManager &_data, const std::string &sTable, const Settings &_option) |
| This static function creates the output table for the terminal. The table will get formatted using the Output class. More... | |
| std::string | plugin_statistics (std::string &sCmd, MemoryManager &_data) |
| This is the implementation of the stats command. More... | |
Variables | |
| const std::string | PI_MED = "1.1.2" |
| enum StatsFields |
This enumeration defines the available statistical values in the vector returned from calcStats().
| Enumerator | |
|---|---|
| STATS_AVG | |
| STATS_STD | |
| STATS_CONFINT | |
| STATS_STDERR | |
| STATS_MED | |
| STATS_Q1 | |
| STATS_Q3 | |
| STATS_RMS | |
| STATS_SKEW | |
| STATS_EXC | |
| STATS_MIN | |
| STATS_MAX | |
| STATS_NUM | |
| STATS_CNT | |
| STATS_S_T | |
| STATS_FIELD_COUNT | |
Definition at line 38 of file plugin_statistics.cpp.
|
static |
This static function calculates the statistical values for all columns in the passed table and returns them as a vector array.
| _data | MemoryManager& |
| sTable | const std::string& |
Definition at line 70 of file plugin_statistics.cpp.
References MemoryManager::avg(), MemoryManager::cnt(), MemoryManager::getCols(), MemoryManager::getElement(), MemoryManager::getLines(), intPower(), MemoryManager::isValidElement(), MemoryManager::max(), MemoryManager::med(), MemoryManager::min(), MemoryManager::norm(), MemoryManager::num(), MemoryManager::pct(), mu::real(), date::round(), STATS_AVG, STATS_CNT, STATS_CONFINT, STATS_EXC, STATS_FIELD_COUNT, STATS_MAX, STATS_MED, STATS_MIN, STATS_NUM, STATS_Q1, STATS_Q3, STATS_RMS, STATS_S_T, STATS_SKEW, STATS_STD, STATS_STDERR, MemoryManager::std(), and student_t().
Referenced by plugin_statistics().
|
static |
This static function will create the output file using the functionalities of the Output class.
| _out | Output& |
| vStats | const std::vector<std::vector<double>>& |
| sSavePath | const std::string& |
| _data | MemoryManager& |
| sTable | const std::string& |
| _option | const Settings& |
Definition at line 211 of file plugin_statistics.cpp.
References _lang, Output::format(), Language::get(), MemoryManager::getCols(), NumeRe::FileAdapter::getDataFileName(), MemoryManager::getElement(), MemoryManager::getHeadlineCount(), MemoryManager::getHeadLineElement(), MemoryManager::getLines(), Settings::getPrecision(), getStatFieldName(), MemoryManager::isValidElement(), PI_MED, Output::reset(), Output::setCommentLine(), Output::setCompact(), Output::setFileName(), Output::setPluginName(), Output::setPrefix(), STATS_AVG, STATS_FIELD_COUNT, STATS_NUM, and toString().
Referenced by createStatsOutput().
|
static |
This static function creates the output table for the terminal. The table will get formatted using the Output class.
This function will also redirect the control to createStatsFile if a file shall be created.
| _out | Output& |
| vStats | const std::vector<std::vector<double>>& |
| sSavePath | const std::string& |
| _data | MemoryManager& |
| sTable | const std::string& |
| _option | const Settings& |
Definition at line 314 of file plugin_statistics.cpp.
References _lang, createStatsFile(), Output::format(), Language::get(), MemoryManager::getCols(), MemoryManager::getHeadlineCount(), MemoryManager::getHeadLineElement(), getStatFieldName(), Output::isFile(), make_hline(), NumeReKernel::print(), Output::reset(), Output::setCommentLine(), Output::setCompact(), STATS_AVG, STATS_CONFINT, STATS_FIELD_COUNT, STATS_NUM, NumeReKernel::toggleTableStatus(), toString(), toSystemCodePage(), and toUpperCase().
Referenced by plugin_statistics().
|
static |
This static function maps the statistical value enumerators to strings used for the tables and the return value.
| nStatField | int |
Definition at line 155 of file plugin_statistics.cpp.
References _lang, Language::get(), STATS_AVG, STATS_CNT, STATS_CONFINT, STATS_EXC, STATS_FIELD_COUNT, STATS_MAX, STATS_MED, STATS_MIN, STATS_NUM, STATS_Q1, STATS_Q3, STATS_RMS, STATS_S_T, STATS_SKEW, STATS_STD, and STATS_STDERR.
Referenced by createStatsFile(), createStatsOutput(), and plugin_statistics().
| std::string plugin_statistics | ( | std::string & | sCmd, |
| MemoryManager & | _data | ||
| ) |
This is the implementation of the stats command.
| sCmd | std::string& |
| _data | MemoryManager& Might be different from the usual MemoryManager |
Definition at line 417 of file plugin_statistics.cpp.
References calcStats(), Indices::col, createStatsOutput(), evaluateTargetOptionInCommand(), findParameter(), getArgAtPos(), MemoryManager::getHeadLineElement(), NumeReKernel::getInstance(), NumeReKernel::getMemoryManager(), NumeReKernel::getOutput(), NumeReKernel::getSettings(), getStatFieldName(), SyntaxError::invalid_position, MemoryManager::isEmpty(), MemoryManager::isValid(), MemoryManager::matchTableAsParameter(), SyntaxError::NO_CACHED_DATA, SyntaxError::NO_DATA_AVAILABLE, Indices::row, MemoryManager::setHeadLineElement(), Output::setStatus(), VectorIndex::size(), STATS_AVG, STATS_FIELD_COUNT, STATS_NUM, and MemoryManager::writeToTable().
Referenced by cmd_stats().
| const std::string PI_MED = "1.1.2" |
Definition at line 30 of file plugin_statistics.cpp.
Referenced by createStatsFile().