SpeedCrunch  0.11
Defines | Functions
/usr/src/RPM/BUILD/speedcrunch-0.11/src/core/functions.cpp File Reference
#include "core/functions.h"
#include "core/settings.h"
#include "math/hmath.h"
#include <QCoreApplication>
#include <QHash>
#include <algorithm>
#include <functional>
#include <cfloat>
#include <cmath>
#include <numeric>
Include dependency graph for functions.cpp:

Defines

#define FUNCTION_INSERT(ID)   insert(new Function(#ID, function_ ## ID, this))
#define FUNCTION_USAGE(ID, USAGE)   find(#ID)->setUsage(QString::fromLatin1(USAGE));
#define FUNCTION_USAGE_TR(ID, USAGE)   find(#ID)->setUsage(USAGE);
#define FUNCTION_NAME(ID, NAME)   find(#ID)->setName(NAME)
#define ENSURE_POSITIVE_ARGUMENT_COUNT()
#define ENSURE_ARGUMENT_COUNT(i)
#define ENSURE_EITHER_ARGUMENT_COUNT(i, j)

Functions

HNumber function_abs (Function *f, const Function::ArgumentList &args)
HNumber function_average (Function *f, const Function::ArgumentList &args)
HNumber function_absdev (Function *f, const Function::ArgumentList &args)
HNumber function_int (Function *f, const Function::ArgumentList &args)
HNumber function_trunc (Function *f, const Function::ArgumentList &args)
HNumber function_frac (Function *f, const Function::ArgumentList &args)
HNumber function_floor (Function *f, const Function::ArgumentList &args)
HNumber function_ceil (Function *f, const Function::ArgumentList &args)
HNumber function_gcd (Function *f, const Function::ArgumentList &args)
HNumber function_round (Function *f, const Function::ArgumentList &args)
HNumber function_sqrt (Function *f, const Function::ArgumentList &args)
HNumber function_variance (Function *f, const Function::ArgumentList &args)
HNumber function_stddev (Function *f, const Function::ArgumentList &args)
HNumber function_cbrt (Function *f, const Function::ArgumentList &args)
HNumber function_exp (Function *f, const Function::ArgumentList &args)
HNumber function_ln (Function *f, const Function::ArgumentList &args)
HNumber function_lg (Function *f, const Function::ArgumentList &args)
HNumber function_lb (Function *f, const Function::ArgumentList &args)
HNumber function_log (Function *f, const Function::ArgumentList &args)
HNumber function_sin (Function *f, const Function::ArgumentList &args)
HNumber function_cos (Function *f, const Function::ArgumentList &args)
HNumber function_tan (Function *f, const Function::ArgumentList &args)
HNumber function_cot (Function *f, const Function::ArgumentList &args)
HNumber function_sec (Function *f, const Function::ArgumentList &args)
HNumber function_csc (Function *f, const Function::ArgumentList &args)
HNumber function_arcsin (Function *f, const Function::ArgumentList &args)
HNumber function_arccos (Function *f, const Function::ArgumentList &args)
HNumber function_arctan (Function *f, const Function::ArgumentList &args)
HNumber function_sinh (Function *f, const Function::ArgumentList &args)
HNumber function_cosh (Function *f, const Function::ArgumentList &args)
HNumber function_tanh (Function *f, const Function::ArgumentList &args)
HNumber function_arsinh (Function *f, const Function::ArgumentList &args)
HNumber function_arcosh (Function *f, const Function::ArgumentList &args)
HNumber function_artanh (Function *f, const Function::ArgumentList &args)
HNumber function_erf (Function *f, const Function::ArgumentList &args)
HNumber function_erfc (Function *f, const Function::ArgumentList &args)
HNumber function_gamma (Function *f, const Function::ArgumentList &args)
HNumber function_lngamma (Function *f, const Function::ArgumentList &args)
HNumber function_sgn (Function *f, const Function::ArgumentList &args)
HNumber function_ncr (Function *f, const Function::ArgumentList &args)
HNumber function_npr (Function *f, const Function::ArgumentList &args)
HNumber function_degrees (Function *f, const Function::ArgumentList &args)
HNumber function_radians (Function *f, const Function::ArgumentList &args)
HNumber function_max (Function *f, const Function::ArgumentList &args)
HNumber function_median (Function *f, const Function::ArgumentList &args)
HNumber function_min (Function *f, const Function::ArgumentList &args)
HNumber function_sum (Function *f, const Function::ArgumentList &args)
HNumber function_product (Function *f, const Function::ArgumentList &args)
HNumber function_geomean (Function *f, const Function::ArgumentList &args)
HNumber function_dec (Function *f, const Function::ArgumentList &args)
HNumber function_hex (Function *f, const Function::ArgumentList &args)
HNumber function_oct (Function *f, const Function::ArgumentList &args)
HNumber function_bin (Function *f, const Function::ArgumentList &args)
HNumber function_binompmf (Function *f, const Function::ArgumentList &args)
HNumber function_binomcdf (Function *f, const Function::ArgumentList &args)
HNumber function_binommean (Function *f, const Function::ArgumentList &args)
HNumber function_binomvar (Function *f, const Function::ArgumentList &args)
HNumber function_hyperpmf (Function *f, const Function::ArgumentList &args)
HNumber function_hypercdf (Function *f, const Function::ArgumentList &args)
HNumber function_hypermean (Function *f, const Function::ArgumentList &args)
HNumber function_hypervar (Function *f, const Function::ArgumentList &args)
HNumber function_poipmf (Function *f, const Function::ArgumentList &args)
HNumber function_poicdf (Function *f, const Function::ArgumentList &args)
HNumber function_poimean (Function *f, const Function::ArgumentList &args)
HNumber function_poivar (Function *f, const Function::ArgumentList &args)
HNumber function_mask (Function *f, const Function::ArgumentList &args)
HNumber function_unmask (Function *f, const Function::ArgumentList &args)
HNumber function_not (Function *f, const Function::ArgumentList &args)
HNumber function_and (Function *f, const Function::ArgumentList &args)
HNumber function_or (Function *f, const Function::ArgumentList &args)
HNumber function_xor (Function *f, const Function::ArgumentList &args)
HNumber function_shl (Function *f, const Function::ArgumentList &args)
HNumber function_shr (Function *f, const Function::ArgumentList &args)
HNumber function_idiv (Function *f, const Function::ArgumentList &args)
HNumber function_mod (Function *f, const Function::ArgumentList &args)

Define Documentation

#define ENSURE_ARGUMENT_COUNT (   i)
Value:
if (args.count() != (i)) { \
        f->setError(InvalidParamCount); \
        return HMath::nan(); \
    }
#define ENSURE_EITHER_ARGUMENT_COUNT (   i,
 
)
Value:
if (args.count() != (i) && args.count() != (j)) { \
        f->setError(InvalidParamCount); \
        return HMath::nan(); \
    }
Value:
if (args.count() < 1) { \
        f->setError(InvalidParamCount); \
        return HMath::nan(); \
    }
#define FUNCTION_INSERT (   ID)    insert(new Function(#ID, function_ ## ID, this))
#define FUNCTION_NAME (   ID,
  NAME 
)    find(#ID)->setName(NAME)
#define FUNCTION_USAGE (   ID,
  USAGE 
)    find(#ID)->setUsage(QString::fromLatin1(USAGE));
#define FUNCTION_USAGE_TR (   ID,
  USAGE 
)    find(#ID)->setUsage(USAGE);

Function Documentation

HNumber function_abs ( Function f,
const Function::ArgumentList args 
)
HNumber function_and ( Function f,
const Function::ArgumentList args 
)
HNumber function_bin ( Function f,
const Function::ArgumentList args 
)
HNumber function_cos ( Function f,
const Function::ArgumentList args 
)
HNumber function_cot ( Function f,
const Function::ArgumentList args 
)
HNumber function_csc ( Function f,
const Function::ArgumentList args 
)
HNumber function_dec ( Function f,
const Function::ArgumentList args 
)
HNumber function_erf ( Function f,
const Function::ArgumentList args 
)
HNumber function_exp ( Function f,
const Function::ArgumentList args 
)
HNumber function_gcd ( Function f,
const Function::ArgumentList args 
)
HNumber function_hex ( Function f,
const Function::ArgumentList args 
)
HNumber function_int ( Function f,
const Function::ArgumentList args 
)
HNumber function_lb ( Function f,
const Function::ArgumentList args 
)
HNumber function_lg ( Function f,
const Function::ArgumentList args 
)
HNumber function_ln ( Function f,
const Function::ArgumentList args 
)
HNumber function_log ( Function f,
const Function::ArgumentList args 
)
HNumber function_max ( Function f,
const Function::ArgumentList args 
)
HNumber function_min ( Function f,
const Function::ArgumentList args 
)
HNumber function_mod ( Function f,
const Function::ArgumentList args 
)
HNumber function_ncr ( Function f,
const Function::ArgumentList args 
)
HNumber function_not ( Function f,
const Function::ArgumentList args 
)
HNumber function_npr ( Function f,
const Function::ArgumentList args 
)
HNumber function_oct ( Function f,
const Function::ArgumentList args 
)
HNumber function_or ( Function f,
const Function::ArgumentList args 
)
HNumber function_sec ( Function f,
const Function::ArgumentList args 
)
HNumber function_sgn ( Function f,
const Function::ArgumentList args 
)
HNumber function_shl ( Function f,
const Function::ArgumentList args 
)
HNumber function_shr ( Function f,
const Function::ArgumentList args 
)
HNumber function_sin ( Function f,
const Function::ArgumentList args 
)
HNumber function_sum ( Function f,
const Function::ArgumentList args 
)
HNumber function_tan ( Function f,
const Function::ArgumentList args 
)
HNumber function_xor ( Function f,
const Function::ArgumentList args 
)