Essentia  2.1-beta6-dev
essentiautil.h File Reference
#include <vector>
#include <cctype>
#include <string>
#include <cmath>
#include "utils/tnt/tnt.h"
#include "types.h"

Go to the source code of this file.

Namespaces

 essentia
 

Macros

#define ARRAY_SIZE(arr)   (sizeof(arr)/sizeof(*(arr)))
 
#define NOWARN_UNUSED(expr)   do { (void)(expr); } while (0)
 

Functions

template<typename T , typename Array >
std::vector< T > arrayToVector (const Array &array)
 
template<typename T >
int indexOf (const std::vector< T > &v, const T &elem)
 
template<typename T >
bool contains (const std::vector< T > &v, const T &elem)
 
bool contains (const std::vector< std::string > &v, const char *str)
 
template<typename T , typename U >
bool contains (const std::map< T, U > &m, const T &key)
 
template<typename T >
bool contains (const OrderedMap< T > &m, const std::string &key)
 
template<typename T >
bool contains (const OrderedMap< T > &m, const char *key)
 
template<typename T >
bool isValid (const T &value)
 
template<typename T >
bool isValid (const Tuple2< T > &value)
 
bool isValid (const std::string &s)
 
template<typename T >
bool isValid (const std::vector< T > &v)
 
template<typename T >
bool isValid (const std::vector< std::vector< T > > &mat)
 
template<typename T >
bool isValid (const TNT::Array2D< T > &mat)
 
template<typename T >
bool isValid (const Tensor< T > &tensor)
 
template<typename T >
void fastcopy (T *dest, const T *src, int n)
 
template<>
void fastcopy< Real > (Real *dest, const Real *src, int n)
 
template<>
void fastcopy< StereoSample > (StereoSample *dest, const StereoSample *src, int n)
 
template<>
void fastcopy< int > (int *dest, const int *src, int n)
 
void fastcopy (std::vector< Real >::iterator dest, std::vector< Real >::const_iterator src, int n)
 
void fastcopy (std::vector< StereoSample >::iterator dest, std::vector< StereoSample >::const_iterator src, int n)
 

Macro Definition Documentation

◆ ARRAY_SIZE

#define ARRAY_SIZE (   arr)    (sizeof(arr)/sizeof(*(arr)))

◆ NOWARN_UNUSED

#define NOWARN_UNUSED (   expr)    do { (void)(expr); } while (0)