Essentia  2.1-beta5-dev
essentiamath.h File Reference
#include <math.h>
#include <cmath>
#include <vector>
#include <numeric>
#include <limits>
#include <functional>
#include <utility>
#include <sstream>
#include <algorithm>
#include <deque>
#include "types.h"
#include "utils/tnt/tnt.h"
#include "utils/tnt/tnt2essentiautils.h"

Go to the source code of this file.

Classes

class  PairCompare< T, U, Comparator >
 

Namespaces

 essentia
 

Macros

#define _USE_MATH_DEFINES
 
#define M_2PI   (2 * M_PI)
 
#define silenceCutoff   1e-9
 
#define dbSilenceCutoff   -90
 

Functions

template<typename T >
bool isPowerTwo (T n)
 
template<typename T >
log2 (T x)
 
template<typename T >
int ilog10 (T n)
 
template<typename T >
nextPowerTwo (T n)
 
template<>
long long int nextPowerTwo (long long int n)
 
template<typename T >
norm (const std::vector< T > &array)
 
template<typename T >
sumSquare (const std::vector< T > array, const size_t start, const size_t end)
 
template<typename T >
sum (const std::vector< T > &array, int start, int end)
 
template<typename T >
mean (const std::vector< T > &array, int start, int end)
 
template<typename T >
sum (const std::vector< T > &array)
 
template<typename T >
mean (const std::vector< T > &array)
 
template<typename T >
TNT::Array2D< T > meanMatrix (const std::vector< TNT::Array2D< T > * > &array)
 
template<typename T >
TNT::Array2D< T > meanMatrix (const std::vector< TNT::Array2D< T > > &array)
 
template<typename T >
std::vector< T > meanFrames (const std::vector< std::vector< T > > &frames, int beginIdx=0, int endIdx=-1)
 
template<typename T >
std::vector< T > medianFrames (const std::vector< std::vector< T > > &frames, int beginIdx=0, int endIdx=-1)
 
template<typename T >
std::vector< T > varianceFrames (const std::vector< std::vector< T > > &frames)
 
template<typename T >
std::vector< T > skewnessFrames (const std::vector< std::vector< T > > &frames)
 
template<typename T >
std::vector< T > kurtosisFrames (const std::vector< std::vector< T > > &frames)
 
template<typename T >
median (const std::vector< T > &array)
 
template<typename T >
void rectify (std::vector< T > &array)
 
template<typename T >
energy (const std::vector< T > &array)
 
template<typename T >
instantPower (const std::vector< T > &array)
 
template<typename T >
bool isSilent (const std::vector< T > &array)
 
template<typename T >
TNT::Array2D< T > varianceMatrix (const std::vector< TNT::Array2D< T > > &array, const TNT::Array2D< T > &mean)
 
template<typename T >
TNT::Array2D< T > varianceMatrix (const std::vector< TNT::Array2D< T > * > &array, const TNT::Array2D< T > &mean)
 
template<typename T >
variance (const std::vector< T > &array, const T mean)
 
template<typename T >
skewness (const std::vector< T > &array, const T mean)
 
template<typename T >
kurtosis (const std::vector< T > &array, const T mean)
 
template<typename T >
stddev (const std::vector< T > &array, const T mean)
 
template<typename T >
round (const T value)
 
Real lin2db (Real value)
 
Real db2lin (Real value)
 
Real pow2db (Real power)
 
Real db2pow (Real power)
 
Real amp2db (Real amplitude)
 
Real db2amp (Real amplitude)
 
Real linear (Real input)
 
Real hz2bark (Real f)
 
Real bark2hz (Real z)
 
Real barkCriticalBandwidth (Real z)
 
Real mel2hz (Real mel)
 
Real mel102hz (Real mel)
 
Real hz2mel (Real hz)
 
Real hz2mel10 (Real hz)
 
Real hz2hz (Real hz)
 
Real hz2cents (Real hz)
 
int argmin (const std::vector< Real > &input)
 
int argmax (const std::vector< Real > &input)
 
template<typename T >
void normalize (std::vector< T > &array)
 
template<typename T >
void normalizeSum (std::vector< T > &array)
 
template<typename T >
std::vector< T > derivative (const std::vector< T > &array)
 
template<typename T , typename U , typename Comparator >
void sortpair (std::vector< T > &v1, std::vector< U > &v2)
 
bool isDenormal (const float &x)
 
template<typename T >
fmod (T a, T b)
 
template<typename T >
princarg (T y)
 
template<typename T >
void hist (const T *array, uint n, int *n_array, T *x_array, uint n_bins)
 
template<typename T >
void bincount (const std::vector< T > &input, std::vector< T > &output)
 
template<typename T >
std::vector< std::vector< T > > transpose (const std::vector< std::vector< T > > &m)
 
template<typename T >
TNT::Array2D< T > transpose (const TNT::Array2D< T > &m)
 
std::string equivalentKey (const std::string key)
 

Macro Definition Documentation

◆ _USE_MATH_DEFINES

#define _USE_MATH_DEFINES

◆ dbSilenceCutoff

#define dbSilenceCutoff   -90

Referenced by essentia::lin2db().

◆ M_2PI

#define M_2PI   (2 * M_PI)

Referenced by essentia::princarg().

◆ silenceCutoff

#define silenceCutoff   1e-9