Audio Effects Framework
CVectorFloat Class Reference

class with static functions for buffer operations with type float More...

#include <Vector.h>

Static Public Member Functions

static void setZero (float *pfSrcDest, int iLength)
 
static void setZeroBelowThresh (float *pfSrcDest, int iLength, float fThresh)
 
static void copy (float *pfDest, const float *pfSource, int iLength)
 
static void flip_I (float *pfSrcDest, int iLength)
 
static void moveInMem (float *pfSrcDest, int iDestIdx, int iSrcIdx, int iLength)
 
static void setValue (float *pfDest, float fValue, int iLength)
 
static void mulC_I (float *pfSrcDest, float fScale, int iLength)
 
static void mul_I (float *pfSrcDest, const float *pfSrc, int iLength)
 
static float mulScalar (const float *pfSrc1, const float *pfSrc2, int iLength)
 
static void div_I (float *pfSrcDest, const float *pfSrc, int iLength)
 
static void add_I (float *pfSrcDest, const float *pfSrc, int iLength)
 
static void addC_I (float *pfSrcDest, float fScale, int iLength)
 
static void sub_I (float *pfSrcDest, const float *pfSrc, int iLength)
 
static float sum (const float *pfSrc, int iLength, bool bAbs=false)
 
static bool isEqual (const float *pfSrc1, const float *pfSrc2, int iLength)
 
static float getMean (const float *pfSrc, long long int iLength)
 
static float getStd (const float *pfSrc, long long int iLength, float fMean=std::numeric_limits< float >::max())
 
static float getRms (const float *pfSrc, long long int iLength)
 
static float getMax (const float *pfSrc, long long int iLength, bool bAbs=false)
 
static float getMin (const float *pfSrc, long long int iLength, bool bAbs=false)
 
static void findMax (const float *pfSrc, float &fMax, long long &iMax, long long int iLength, bool bAbs=false)
 
static void findMin (const float *pfSrc, float &fMin, long long &iMin, long long int iLength, bool bAbs=false)
 

Detailed Description

class with static functions for buffer operations with type float

Member Function Documentation

◆ add_I()

static void CVectorFloat::add_I ( float *  pfSrcDest,
const float *  pfSrc,
int  iLength 
)
inlinestatic

element-wise vector addition

Parameters
pfSrcDestone input and output buffer
pfSrcsecond input buffer
iLengthnumber of element to be added
Returns
void

◆ addC_I()

static void CVectorFloat::addC_I ( float *  pfSrcDest,
float  fScale,
int  iLength 
)
inlinestatic

adds a buffer to a scalar

Parameters
pfSrcDestbuffer to be added
fScalescalar
iLengthnumber of element to be added
Returns
void

◆ copy()

static void CVectorFloat::copy ( float *  pfDest,
const float *  pfSource,
int  iLength 
)
inlinestatic

copies buffer of type float

Parameters
pfDestpointer to destination memory
pfSourcepointer to source memory
iLengthlength of buffer
Returns
void

◆ div_I()

static void CVectorFloat::div_I ( float *  pfSrcDest,
const float *  pfSrc,
int  iLength 
)
inlinestatic

element-wise vector division

Parameters
pfSrcDestone input and output buffer
pfSrcsecond input buffer
iLengthnumber of element to be divided
Returns
void

◆ findMax()

static void CVectorFloat::findMax ( const float *  pfSrc,
float &  fMax,
long long &  iMax,
long long int  iLength,
bool  bAbs = false 
)
inlinestatic

finds the maximum (absolute) value in the buffer

Parameters
pfSrcinput buffer
fMaxresulting output value
iMaxindex of the resulting output value
iLengthnumber of elements in buffer
bAbsbool to specify whether we search absolute values
Returns
float

◆ findMin()

static void CVectorFloat::findMin ( const float *  pfSrc,
float &  fMin,
long long &  iMin,
long long int  iLength,
bool  bAbs = false 
)
inlinestatic

finds the minimum (absolute) value in the buffer

Parameters
pfSrcinput buffer
fMinresulting output value
iMinindex of the resulting output value
iLengthnumber of elements in buffer
bAbsbool to specify whether we search absolute values
Returns
float

◆ flip_I()

static void CVectorFloat::flip_I ( float *  pfSrcDest,
int  iLength 
)
inlinestatic

reverses buffer (last to first element)

Parameters
pfSrcDestpointer to memory to be flipped
iLengthnumber of elements
Returns
void

◆ getMax()

static float CVectorFloat::getMax ( const float *  pfSrc,
long long int  iLength,
bool  bAbs = false 
)
inlinestatic

finds the maximum (absolute) value in the buffer

Parameters
pfSrcinput buffer
iLengthnumber of elements in buffer
bAbsbool to specify whether we search absolute values
Returns
float

◆ getMean()

static float CVectorFloat::getMean ( const float *  pfSrc,
long long int  iLength 
)
inlinestatic

extracts the mean value

Parameters
pfSrcinput buffer
iLengthnumber of elements in buffer
Returns
float

◆ getMin()

static float CVectorFloat::getMin ( const float *  pfSrc,
long long int  iLength,
bool  bAbs = false 
)
inlinestatic

finds the minimum (absolute) value in the buffer

Parameters
pfSrcinput buffer
iLengthnumber of elements in buffer
bAbsbool to specify whether we search absolute values
Returns
float

◆ getRms()

static float CVectorFloat::getRms ( const float *  pfSrc,
long long int  iLength 
)
inlinestatic

extracts the root mean square from a buffer

Parameters
pfSrcinput buffer
iLengthnumber of elements in buffer
Returns
float

◆ getStd()

static float CVectorFloat::getStd ( const float *  pfSrc,
long long int  iLength,
float  fMean = std::numeric_limits<float>::max() 
)
inlinestatic

extracts the standard deviation (biased) from a buffer

Parameters
pfSrcinput buffer
iLengthnumber of elements in buffer
fMeanmean value if it has already been computed, otherwise it will be extracted in function
Returns
float

◆ isEqual()

static bool CVectorFloat::isEqual ( const float *  pfSrc1,
const float *  pfSrc2,
int  iLength 
)
inlinestatic

checks to buffer for equality (no floating point tolerance)

Parameters
pfSrc1buffer 1
pfSrc2buffer 2
iLengthnumber of dimensions
Returns
bool

◆ moveInMem()

static void CVectorFloat::moveInMem ( float *  pfSrcDest,
int  iDestIdx,
int  iSrcIdx,
int  iLength 
)
inlinestatic

moves a subset of the current buffer

Parameters
pfSrcDestsource and destination
iDestIdxdestination index
iSrcIdxsource index
iLengthnumber of elements to be moved
Returns
void

◆ mul_I()

static void CVectorFloat::mul_I ( float *  pfSrcDest,
const float *  pfSrc,
int  iLength 
)
inlinestatic

element-wise vector multiplication

Parameters
pfSrcDestone input and output buffer
pfSrcsecond input buffer
iLengthnumber of element to be multiplied
Returns
void

◆ mulC_I()

static void CVectorFloat::mulC_I ( float *  pfSrcDest,
float  fScale,
int  iLength 
)
inlinestatic

multiplies a buffer with a scalar

Parameters
pfSrcDestbuffer to be multiplied
fScalescalar
iLengthnumber of element to be multiplied
Returns
void

◆ mulScalar()

static float CVectorFloat::mulScalar ( const float *  pfSrc1,
const float *  pfSrc2,
int  iLength 
)
inlinestatic

computes the scalar product between two vectors

Parameters
pfSrc1vector one
pfSrc2vector two
iLengthnumber of dimenions
Returns
float

◆ setValue()

static void CVectorFloat::setValue ( float *  pfDest,
float  fValue,
int  iLength 
)
inlinestatic

initializes the buffer to a specific value

Parameters
pfDestpointer to memory to be initialized
fValuevalue to use
iLengthnumber of elements to be set
Returns
void

◆ setZero()

static void CVectorFloat::setZero ( float *  pfSrcDest,
int  iLength 
)
inlinestatic

sets a buffer to zero

Parameters
pfSrcDestpointer to memory to be modified
iLengthbuffer length
Returns
void

◆ setZeroBelowThresh()

static void CVectorFloat::setZeroBelowThresh ( float *  pfSrcDest,
int  iLength,
float  fThresh 
)
inlinestatic

sets all values smaller than a threshold to 0

Parameters
pfSrcDestpointer to memory to be modified
iLengthbuffer length
fThreshthreshold value
Returns
void

◆ sub_I()

static void CVectorFloat::sub_I ( float *  pfSrcDest,
const float *  pfSrc,
int  iLength 
)
inlinestatic

element-wise vector subtraction

Parameters
pfSrcDestone input and output buffer
pfSrcsecond input buffer
iLengthnumber of element to be subtracted
Returns
void

◆ sum()

static float CVectorFloat::sum ( const float *  pfSrc,
int  iLength,
bool  bAbs = false 
)
inlinestatic

computes the sum of a vector

Parameters
pfSrcvector
iLengthlength of vector
bAbsspecifies whether it is the sum of absolute values or not
Returns
float

The documentation for this class was generated from the following file: