NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
memory.cpp File Reference
#include <memory>
#include <gsl/gsl_statistics.h>
#include <gsl/gsl_sort.h>
#include <gsl/gsl_cdf.h>
#include "memory.hpp"
#include "tablecolumnimpl.hpp"
#include "../../kernel.hpp"
#include "../io/file.hpp"
#include "../ui/error.hpp"
#include "../settings.hpp"
#include "../utils/tools.hpp"
#include "../version.h"
#include "../maths/resampler.h"
#include "../maths/statslogic.hpp"
#include "../maths/matdatastructures.hpp"
Include dependency graph for memory.cpp:

Go to the source code of this file.

Macros

#define MAX_TABLE_SIZE   1e8
 
#define MAX_TABLE_COLS   1e4
 
#define DEFAULT_COL_TYPE   ValueColumn
 

Functions

static mu::value_type nanAvg (const std::vector< mu::value_type > &values)
 This static helper function calculates the average value respecting NaNs. More...
 
static bool closeEnough (double d1, double d2)
 Static helper function to ensure that two doubles are actually close enough to be considered equal. More...
 
static bool closeEnough (const mu::value_type &v1, const mu::value_type &v2)
 Static helper function to ensure that two complex values are actually close enough to be considered equal. More...
 
static void evaluateRankingStrategy (std::vector< mu::value_type > &vRank, size_t &nEqualRanks, Memory::RankingStrategy _strat)
 Evaluate the identical ranked values according the selected ranking strategy. More...
 

Macro Definition Documentation

◆ DEFAULT_COL_TYPE

#define DEFAULT_COL_TYPE   ValueColumn

Definition at line 38 of file memory.cpp.

◆ MAX_TABLE_COLS

#define MAX_TABLE_COLS   1e4

Definition at line 37 of file memory.cpp.

◆ MAX_TABLE_SIZE

#define MAX_TABLE_SIZE   1e8

Definition at line 36 of file memory.cpp.

Function Documentation

◆ closeEnough() [1/2]

static bool closeEnough ( const mu::value_type v1,
const mu::value_type v2 
)
static

Static helper function to ensure that two complex values are actually close enough to be considered equal.

Parameters
v1const mu::value_type&
v2const mu::value_type&
Returns
bool

Definition at line 3125 of file memory.cpp.

References closeEnough().

Here is the call graph for this function:

◆ closeEnough() [2/2]

static bool closeEnough ( double  d1,
double  d2 
)
static

Static helper function to ensure that two doubles are actually close enough to be considered equal.

Parameters
d1double
d2double
Returns
bool

Definition at line 3109 of file memory.cpp.

References date::abs(), max, and min.

Referenced by closeEnough(), Memory::countIfEqual(), and Memory::getIndex().

Here is the call graph for this function:

◆ evaluateRankingStrategy()

static void evaluateRankingStrategy ( std::vector< mu::value_type > &  vRank,
size_t &  nEqualRanks,
Memory::RankingStrategy  _strat 
)
static

Evaluate the identical ranked values according the selected ranking strategy.

Parameters
vRankstd::vector<mu::value_type>&
nEqualRankssize_t&
_stratMemory::RankingStrategy
Returns
void

Definition at line 3465 of file memory.cpp.

References Memory::RANK_COMPETETIVE, Memory::RANK_DENSE, and Memory::RANK_FRACTIONAL.

Referenced by Memory::getRank().

◆ nanAvg()

static mu::value_type nanAvg ( const std::vector< mu::value_type > &  values)
static

This static helper function calculates the average value respecting NaNs.

Parameters
valuesconst std::vector<mu::value_type>&
Returns
mu::value_type

Definition at line 367 of file memory.cpp.

References mu::isnan().

Referenced by Memory::readMemInterpolated().

Here is the call graph for this function: