OpenWareLaboratory
Window Class Reference
Inheritance diagram for Window:
Collaboration diagram for Window:

Public Types

enum  WindowType {
  HammingWindow, HannWindow, HanningWindow, TriangularWindow,
  RectangularWindow
}
 
typedef enum Window::WindowType WindowType
 

Public Member Functions

void add (FloatArray operand2, FloatArray destination)
 Element-wise sum between arrays. More...
 
void add (FloatArray operand2)
 Element-wise sum between arrays. More...
 
void add (float scalar)
 Array-scalar sum. More...
 
void apply (float *signalIn)
 
void apply (float *signalIn, float *signalOut)
 
void clear ()
 Clear the array. More...
 
void clip ()
 Clips the elements in the array in the range [-1, 1]. More...
 
void clip (float range)
 Clips the elements in the array in the range [-**range**, range]. More...
 
void clip (float min, float max)
 Clips the elements in the array in the range [min, max]. More...
 
void convolve (FloatArray operand2, FloatArray destination)
 Convolution between arrays. More...
 
void convolve (FloatArray operand2, FloatArray destination, int offset, size_t samples)
 Partial convolution between arrays. More...
 
void copyFrom (FloatArray source)
 Copies the content of an array into another array. More...
 
void copyFrom (float *source, size_t length)
 Copies an array of float into the array. More...
 
void copyTo (FloatArray destination)
 Copies the content of the array to another array. More...
 
void copyTo (float *destination, size_t length)
 Copies the content of the array to a location in memory. More...
 
void correlate (FloatArray operand2, FloatArray destination)
 Correlation between arrays. More...
 
void correlateInitialized (FloatArray operand2, FloatArray destination)
 Correlation between arrays. More...
 
void decibelToGain (FloatArray destination)
 Convert decibel to gains values: gain = 10^(dB/20) -6dB = 0.5, 0dB = 1.0, +6dB = 2.0. More...
 
bool equals (const FloatArray &other) const
 Compares two arrays. More...
 
void gainToDecibel (FloatArray destination)
 Convert gains to decibel values: dB = log10(gain)*20 Gain 0.5 = -6dB, 1.0 = 0dB, 2.0 = +6dB. More...
 
float * getData ()
 Get the data stored in the FloatArray. More...
 
float getDb ()
 
float getElement (int index)
 Get a single float stored in the FloatArray. More...
 
void getMax (float *value, int *index)
 Get the maximum value in the array and its index. More...
 
int getMaxIndex ()
 Get the index of the maximum value in the array. More...
 
float getMaxValue ()
 Get the maximum value in the array. More...
 
float getMean ()
 Mean of the array. More...
 
void getMin (float *value, int *index)
 Get the minimum value in the array and its index. More...
 
int getMinIndex ()
 Get the index of the minimum value in the array. More...
 
float getMinValue ()
 Get the minimum value in the array. More...
 
float getPower ()
 Power of the array. More...
 
float getRms ()
 Root mean square value of the array. More...
 
size_t getSize () const
 
size_t getSize ()
 
float getStandardDeviation ()
 Standard deviation of the array. More...
 
float getSum ()
 Sum of the array. More...
 
float getVariance ()
 Variance of the array. More...
 
void insert (FloatArray source, int destinationOffset, size_t samples)
 Copies the content of an array into a subset of the array. More...
 
void insert (FloatArray source, int sourceOffset, int destinationOffset, size_t samples)
 Copies the content of an array into a subset of the array. More...
 
void move (int fromIndex, int toIndex, size_t length)
 Copies values within an array. More...
 
void multiply (FloatArray operand2, FloatArray destination)
 Element-wise multiplication between arrays. More...
 
void multiply (FloatArray operand2)
 Element-wise multiplication between arrays. More...
 
void multiply (float scalar)
 Array-scalar multiplication. More...
 
void multiply (float scalar, FloatArray destination)
 Array-scalar multiplication. More...
 
void negate (FloatArray &destination)
 Negate the array. More...
 
void negate ()
 Negate the array. More...
 
void noise ()
 Random values Fills the array with random values in the range [-1, 1) More...
 
void noise (float min, float max)
 Random values in range. More...
 
 operator float * ()
 Casting operator to float*. More...
 
float & operator[] (const int index)
 Allows to index the array using array-style brackets. More...
 
float & operator[] (const int index) const
 Allows to index the array using array-style brackets. More...
 
void ramp (float from, float to)
 Create a linear ramp from one value to another across all values in the Float. More...
 
void reciprocal (FloatArray &destination)
 Reciprocal of the array. More...
 
void reciprocal ()
 Reciprocal of the array. More...
 
void rectify (FloatArray &destination)
 Absolute value of the array. More...
 
void rectify ()
 Absolute value of the array. More...
 
void reverse (FloatArray &destination)
 Reverse the array Copies the elements of the array in reversed order into destination. More...
 
void reverse ()
 Reverse the array. More...
 
void setAll (float value)
 Set all the values in the array. More...
 
void setElement (int index, float value)
 Set a single float in the FloatArray. More...
 
FloatArray subArray (int offset, size_t length)
 A subset of the array. More...
 
void subtract (FloatArray operand2, FloatArray destination)
 Element-wise difference between arrays. More...
 
void subtract (FloatArray operand2)
 Element-wise difference between arrays. More...
 
void subtract (float scalar)
 Array-scalar subtraction. More...
 
void tanh (FloatArray destination)
 Apply tanh to each element in the array. More...
 
void tanh ()
 In-place tanh. More...
 
 Window ()
 
 Window (float *win, int size)
 

Static Public Member Functions

static void applyTriangularWindow (float *signal, int size)
 
static void applyTriangularWindow (float *signalIn, float *signalOut, int size)
 
static void applyWindow (float *signal, float *window, int size)
 
static void applyWindow (float *signalIn, float *window, float *signalOut, int size)
 
static Window create (WindowType type, int size)
 
static Window create (int size)
 
static void destroy (FloatArray array)
 Destroys a FloatArray created with the create() method. More...
 
static void hamming (float *window, int size)
 
static void hann (float *window, int size)
 
static void rectangular (float *window, int size)
 
static void triangular (float *window, int size)
 
static void window (WindowType type, float *window, int size)
 

Detailed Description

Definition at line 19 of file Window.h.

Member Typedef Documentation

Member Enumeration Documentation

Enumerator
HammingWindow 
HannWindow 
HanningWindow 
TriangularWindow 
RectangularWindow 

Definition at line 21 of file Window.h.

Constructor & Destructor Documentation

Window::Window ( )
inline

Definition at line 28 of file Window.h.

Window::Window ( float *  win,
int  size 
)
inline

Definition at line 29 of file Window.h.

Member Function Documentation

void FloatArray::add ( FloatArray  operand2,
FloatArray  destination 
)
inherited

Element-wise sum between arrays.

Sets each element in destination to the sum of the corresponding element of the array and operand2

Parameters
[in]operand2second operand for the sum
[out]destinationthe destination array
Note
When built for ARM Cortex-M processor series, this method uses the optimized CMSIS library

Definition at line 297 of file FloatArray.cpp.

References ASSERT.

Referenced by FloatArray::add().

void FloatArray::add ( FloatArray  operand2)
inherited

Element-wise sum between arrays.

Adds each element of operand2 to the corresponding element in the array.

Parameters
operand2second operand for the sum
Note
When built for ARM Cortex-M processor series, this method uses the optimized CMSIS library

Definition at line 313 of file FloatArray.cpp.

References FloatArray::add().

void FloatArray::add ( float  scalar)
inherited

Array-scalar sum.

Adds scalar to the values in the array.

Parameters
scalarvalue to be added to the array

Definition at line 318 of file FloatArray.cpp.

void Window::apply ( float *  signalIn)
inline

Definition at line 30 of file Window.h.

References applyWindow(), FloatArray::getData(), and FloatArray::getSize().

void Window::apply ( float *  signalIn,
float *  signalOut 
)
inline

Definition at line 33 of file Window.h.

References applyWindow(), FloatArray::getData(), and FloatArray::getSize().

static void Window::applyTriangularWindow ( float *  signal,
int  size 
)
inlinestatic

Definition at line 89 of file Window.h.

static void Window::applyTriangularWindow ( float *  signalIn,
float *  signalOut,
int  size 
)
inlinestatic

Definition at line 92 of file Window.h.

References FloatArray::ramp().

static void Window::applyWindow ( float *  signal,
float *  window,
int  size 
)
inlinestatic

Definition at line 105 of file Window.h.

Referenced by apply().

void Window::applyWindow ( float *  signalIn,
float *  window,
float *  signalOut,
int  size 
)
static

Definition at line 3 of file Window.cpp.

void FloatArray::clear ( )
inlineinherited

Clear the array.

Set all the values in the array to 0.

Definition at line 31 of file FloatArray.h.

References FloatArray::setAll().

Referenced by FirFilter::create(), and FloatArray::create().

void FloatArray::clip ( )
inherited

Clips the elements in the array in the range [-1, 1].

Definition at line 208 of file FloatArray.cpp.

void FloatArray::clip ( float  range)
inherited

Clips the elements in the array in the range [-**range**, range].

Parameters
rangeclipping value.

Definition at line 212 of file FloatArray.cpp.

References max.

void FloatArray::clip ( float  min,
float  max 
)
inherited

Clips the elements in the array in the range [min, max].

Parameters
minminimum value
maxmaximum value

Definition at line 221 of file FloatArray.cpp.

References max, and min.

void FloatArray::convolve ( FloatArray  operand2,
FloatArray  destination 
)
inherited

Convolution between arrays.

Sets destination to the result of the convolution between the array and operand2

Parameters
[in]operand2the second operand for the convolution
[out]destinationarray. It must have a minimum size of this+other-1.
Note
When built for ARM Cortex-M processor series, this method uses the optimized CMSIS library

Definition at line 421 of file FloatArray.cpp.

References ASSERT, and FloatArray::getSize().

Referenced by FloatArray::correlateInitialized().

void FloatArray::convolve ( FloatArray  operand2,
FloatArray  destination,
int  offset,
size_t  samples 
)
inherited

Partial convolution between arrays.

Perform partial convolution: start at offset and compute samples values.

Parameters
[in]operand2the second operand for the convolution.
[out]destinationthe destination array.
[in]offsetfirst output sample to compute
[in]samplesnumber of samples to compute
Remarks
destination[n] is left unchanged for n<offset and the result is stored from destination[offset] onwards that is, in the same position where they would be if a full convolution was performed.
Note
When built for ARM Cortex-M processor series, this method uses the optimized CMSIS library

Definition at line 440 of file FloatArray.cpp.

References ASSERT, FloatArray::getData(), and FloatArray::getSize().

void FloatArray::copyFrom ( FloatArray  source)
inherited

Copies the content of an array into another array.

Parameters
[in]sourcethe source array
Note
When built for ARM Cortex-M processor series, this method uses the optimized CMSIS library

Definition at line 240 of file FloatArray.cpp.

References FloatArray::getSize(), and min.

Referenced by FilterStage::setCoefficients(), and FirFilter::setCoefficients().

void FloatArray::copyFrom ( float *  source,
size_t  length 
)
inherited

Copies an array of float into the array.

Parameters
[in]sourcea pointer to the beginning of the portion of memory to read from.
[in]lengthnumber of samples to copy.
Note
When built for ARM Cortex-M processor series, this method uses the optimized CMSIS library

Definition at line 255 of file FloatArray.cpp.

References ASSERT, and FloatArray::getData().

void FloatArray::copyTo ( FloatArray  destination)
inherited

Copies the content of the array to another array.

Parameters
[out]destinationthe destination array
Note
When built for ARM Cortex-M processor series, this method uses the optimized CMSIS library

Definition at line 235 of file FloatArray.cpp.

References FloatArray::getSize(), and min.

void FloatArray::copyTo ( float *  destination,
size_t  length 
)
inherited

Copies the content of the array to a location in memory.

Parameters
[out]destinationa pointer to the beginning of the memory location to copy to. The **length***sizeof(float) bytes of memory starting at this location must have been allocated before calling this method.
[in]lengthnumber of samples to copy
Note
When built for ARM Cortex-M processor series, this method uses the optimized CMSIS library

Definition at line 245 of file FloatArray.cpp.

References ASSERT, and FloatArray::getData().

void FloatArray::correlate ( FloatArray  operand2,
FloatArray  destination 
)
inherited

Correlation between arrays.

Sets destination to the correlation of the array and operand2.

Parameters
[in]operand2the second operand for the correlation
[out]destinationthe destination array. It must have a minimum size of 2*max(srcALen, srcBLen)-1
Note
When built for ARM Cortex-M processor series, this method uses the optimized CMSIS library

Definition at line 468 of file FloatArray.cpp.

References FloatArray::correlateInitialized(), and FloatArray::setAll().

void FloatArray::correlateInitialized ( FloatArray  operand2,
FloatArray  destination 
)
inherited

Correlation between arrays.

Sets destination to the correlation of this array and operand2.

Parameters
[in]operand2the second operand for the correlation
[out]destinationarray. It must have a minimum size of 2*max(srcALen, srcBLen)-1
Remarks
It is the same as correlate(), but destination must have been initialized to 0 in advance.
Note
When built for ARM Cortex-M processor series, this method uses the optimized CMSIS library

Definition at line 473 of file FloatArray.cpp.

References ASSERT, FloatArray::convolve(), and FloatArray::reverse().

Referenced by FloatArray::correlate().

static Window Window::create ( WindowType  type,
int  size 
)
inlinestatic

Definition at line 36 of file Window.h.

References window().

Referenced by FourierPitchDetector::init().

static Window Window::create ( int  size)
inlinestatic

Definition at line 41 of file Window.h.

void FloatArray::decibelToGain ( FloatArray  destination)
inherited

Convert decibel to gains values: gain = 10^(dB/20) -6dB = 0.5, 0dB = 1.0, +6dB = 2.0.

Definition at line 495 of file FloatArray.cpp.

References ASSERT, and FloatArray::getSize().

void FloatArray::destroy ( FloatArray  array)
staticinherited

Destroys a FloatArray created with the create() method.

Parameters
arraythe FloatArray to be destroyed.
Remarks
the FloatArray object passed as an argument should not be used again after invoking this method.
a FloatArray object that has not been created by the FloatArray::create() method might cause an exception if passed as an argument to this method.

Definition at line 525 of file FloatArray.cpp.

Referenced by WavetableOscillator::destroy(), FirFilter::destroy(), GaussianNoiseOscillator::destroy(), StereoBiquadFilter::destroy(), FourierPitchDetector::~FourierPitchDetector(), and ZeroCrossingPitchDetector::~ZeroCrossingPitchDetector().

bool FloatArray::equals ( const FloatArray other) const
inlineinherited

Compares two arrays.

Performs an element-wise comparison of the values contained in the arrays.

Parameters
otherthe array to compare against.
Returns
true if the arrays have the same size and the value of each of the elements of the one match the value of the corresponding element of the other, or false otherwise.

Definition at line 429 of file FloatArray.h.

References FloatArray::getSize().

void FloatArray::gainToDecibel ( FloatArray  destination)
inherited

Convert gains to decibel values: dB = log10(gain)*20 Gain 0.5 = -6dB, 1.0 = 0dB, 2.0 = +6dB.

Definition at line 489 of file FloatArray.cpp.

References ASSERT, and FloatArray::getSize().

float* FloatArray::getData ( )
inlineinherited
float FloatArray::getDb ( )
inherited
float FloatArray::getElement ( int  index)
inlineinherited

Get a single float stored in the FloatArray.

Returns
the float stored at index
Parameters
index

Definition at line 461 of file FloatArray.h.

void FloatArray::getMax ( float *  value,
int *  index 
)
inherited

Get the maximum value in the array and its index.

Parameters
[out]valuewill be set to the maximum value after the call
[out]indexwill be set to the index of the maximum value after the call
Note
When built for ARM Cortex-M processor series, this method uses the optimized CMSIS library

Definition at line 47 of file FloatArray.cpp.

References ASSERT.

Referenced by FloatArray::getMaxIndex(), and FloatArray::getMaxValue().

int FloatArray::getMaxIndex ( )
inherited

Get the index of the maximum value in the array.

Returns
the maximum value contained in the array
Note
When built for ARM Cortex-M processor series, this method uses the optimized CMSIS library

Definition at line 75 of file FloatArray.cpp.

References FloatArray::getMax().

Referenced by FourierPitchDetector::computeFrequency().

float FloatArray::getMaxValue ( )
inherited

Get the maximum value in the array.

Returns
the maximum value contained in the array
Note
When built for ARM Cortex-M processor series, this method uses the optimized CMSIS library

Definition at line 67 of file FloatArray.cpp.

References FloatArray::getMax().

float FloatArray::getMean ( )
inherited

Mean of the array.

Gets the mean (or average) of the values in the array.

Note
When built for ARM Cortex-M processor series, this method uses the optimized CMSIS library

Definition at line 151 of file FloatArray.cpp.

Referenced by ZeroCrossingPitchDetector::getFrequency().

void FloatArray::getMin ( float *  value,
int *  index 
)
inherited

Get the minimum value in the array and its index.

Parameters
[out]valuewill be set to the minimum value after the call
[out]indexwill be set to the index of the minimum value after the call
Note
When built for ARM Cortex-M processor series, this method uses the optimized CMSIS library

Definition at line 12 of file FloatArray.cpp.

Referenced by FloatArray::getMinIndex(), and FloatArray::getMinValue().

int FloatArray::getMinIndex ( )
inherited

Get the index of the minimum value in the array.

Returns
the mimimum value contained in the array
Note
When built for ARM Cortex-M processor series, this method uses the optimized CMSIS library

Definition at line 39 of file FloatArray.cpp.

References FloatArray::getMin().

float FloatArray::getMinValue ( )
inherited

Get the minimum value in the array.

Returns
the minimum value contained in the array
Note
When built for ARM Cortex-M processor series, this method uses the optimized CMSIS library

Definition at line 31 of file FloatArray.cpp.

References FloatArray::getMin().

float FloatArray::getPower ( )
inherited

Power of the array.

Gets the power of the values in the array.

Note
When built for ARM Cortex-M processor series, this method uses the optimized CMSIS library

Definition at line 166 of file FloatArray.cpp.

Referenced by FloatArray::getVariance().

float FloatArray::getRms ( )
inherited

Root mean square value of the array.

Gets the root mean square of the values in the array.

Note
When built for ARM Cortex-M processor series, this method uses the optimized CMSIS library

Definition at line 128 of file FloatArray.cpp.

size_t FloatArray::getSize ( )
inlineinherited

Definition at line 23 of file FloatArray.h.

float FloatArray::getStandardDeviation ( )
inherited

Standard deviation of the array.

Gets the standard deviation of the values in the array.

Note
When built for ARM Cortex-M processor series, this method uses the optimized CMSIS library

Definition at line 181 of file FloatArray.cpp.

References FloatArray::getVariance().

float FloatArray::getSum ( )
inherited

Sum of the array.

Gets the sum of the values in the array.

Definition at line 144 of file FloatArray.cpp.

float FloatArray::getVariance ( )
inherited

Variance of the array.

Gets the variance of the values in the array.

Note
When built for ARM Cortex-M processor series, this method uses the optimized CMSIS library

Definition at line 192 of file FloatArray.cpp.

References FloatArray::getPower().

Referenced by FloatArray::getStandardDeviation().

static void Window::hamming ( float *  window,
int  size 
)
inlinestatic

Definition at line 71 of file Window.h.

References M_PI.

Referenced by window().

static void Window::hann ( float *  window,
int  size 
)
inlinestatic

Definition at line 67 of file Window.h.

References M_PI.

Referenced by window().

void FloatArray::insert ( FloatArray  source,
int  destinationOffset,
size_t  samples 
)
inherited

Copies the content of an array into a subset of the array.

Copies samples elements from source to destinationOffset in the current array.

Parameters
[in]sourcethe source array
[in]destinationOffsetthe offset into the destination array
[in]samplesthe number of samples to copy
Note
When built for ARM Cortex-M processor series, this method uses the optimized CMSIS library

Definition at line 276 of file FloatArray.cpp.

Referenced by FourierPitchDetector::process().

void FloatArray::insert ( FloatArray  source,
int  sourceOffset,
int  destinationOffset,
size_t  samples 
)
inherited

Copies the content of an array into a subset of the array.

Copies samples elements starting from sourceOffset of source to destinationOffset in the current array.

Parameters
[in]sourcethe source array
[in]sourceOffsetthe offset into the source array
[in]destinationOffsetthe offset into the destination array
[in]samplesthe number of samples to copy
Note
When built for ARM Cortex-M processor series, this method uses the optimized CMSIS library

Definition at line 265 of file FloatArray.cpp.

References ASSERT, and FloatArray::getData().

void FloatArray::move ( int  fromIndex,
int  toIndex,
size_t  length 
)
inherited

Copies values within an array.

Copies length values starting from index fromIndex to locations starting with index toIndex

Parameters
[in]fromIndexthe first element to copy
[in]toIndexthe destination of the first element
[in]lengththe number of elements to copy
Remarks
this method uses memmove() so that the source memory and the destination memory can overlap. As a consequence it might have slow performances.

Definition at line 281 of file FloatArray.cpp.

References ASSERT.

void FloatArray::multiply ( FloatArray  operand2,
FloatArray  destination 
)
inherited

Element-wise multiplication between arrays.

Sets each element in destination to the product of the corresponding element of the array and operand2

Parameters
[in]operand2second operand for the product
[out]destinationthe destination array
Note
When built for ARM Cortex-M processor series, this method uses the optimized CMSIS library

Definition at line 351 of file FloatArray.cpp.

References ASSERT.

Referenced by PolyBlepOscillator::getSamples(), FloatArray::multiply(), and FourierPitchDetector::process().

void FloatArray::multiply ( FloatArray  operand2)
inherited

Element-wise multiplication between arrays.

Multiplies each element in the array by the corresponding element in operand2.

Parameters
operand2second operand for the sum
Note
When built for ARM Cortex-M processor series, this method uses the optimized CMSIS library

Definition at line 368 of file FloatArray.cpp.

References FloatArray::multiply().

void FloatArray::multiply ( float  scalar)
inherited

Array-scalar multiplication.

Multiplies the values in the array by scalar.

Parameters
scalarto be multiplied with the array elements

Definition at line 373 of file FloatArray.cpp.

void FloatArray::multiply ( float  scalar,
FloatArray  destination 
)
inherited

Array-scalar multiplication.

Multiplies the values in the array by scalar.

Parameters
scalarto be subtracted from the array
destinationthe destination array

Definition at line 382 of file FloatArray.cpp.

void FloatArray::negate ( FloatArray destination)
inherited

Negate the array.

Stores the opposite of the elements in the array into destination.

Parameters
[out]destinationthe destination array.
Note
When built for ARM Cortex-M processor series, this method uses the optimized CMSIS library

Definition at line 391 of file FloatArray.cpp.

References FloatArray::getData().

void FloatArray::negate ( )
inherited

Negate the array.

Sets each element in the array to its opposite.

Note
When built for ARM Cortex-M processor series, this method uses the optimized CMSIS library

Definition at line 401 of file FloatArray.cpp.

void FloatArray::noise ( )
inherited

Random values Fills the array with random values in the range [-1, 1)

Definition at line 406 of file FloatArray.cpp.

void FloatArray::noise ( float  min,
float  max 
)
inherited

Random values in range.

Fills the array with random values in the range [min, max)

Parameters
minminimum value in the range
maxmaximum value in the range

Definition at line 410 of file FloatArray.cpp.

References ASSERT, FloatArray::getSize(), and min.

FloatArray::operator float * ( )
inlineinherited

Casting operator to float*.

Returns
a float* pointer to the data stored in the FloatArray

Definition at line 445 of file FloatArray.h.

float& FloatArray::operator[] ( const int  index)
inlineinherited

Allows to index the array using array-style brackets.

Parameters
indexthe index of the element
Returns
the value of the index element of the array Example usage:
int size=1000;
float content[size];
FloatArray floatArray(content, size);
for(int n=0; n<size; n++)
content[n]==floatArray[n]; //now the FloatArray can be indexed as if it was an array

Definition at line 410 of file FloatArray.h.

float& FloatArray::operator[] ( const int  index) const
inlineinherited

Allows to index the array using array-style brackets.

const version of operator[]

Definition at line 418 of file FloatArray.h.

void FloatArray::ramp ( float  from,
float  to 
)
inherited

Create a linear ramp from one value to another across all values in the Float.

Definition at line 501 of file FloatArray.cpp.

Referenced by applyTriangularWindow(), and triangular().

void FloatArray::reciprocal ( FloatArray destination)
inherited

Reciprocal of the array.

Stores the reciprocal of the elements in the array into destination.

Parameters
[out]destinationthe destination array.

Definition at line 118 of file FloatArray.cpp.

References FloatArray::getData(), and FloatArray::getSize().

void FloatArray::reciprocal ( )
inherited

Reciprocal of the array.

Sets each element in the array to its reciprocal.

Definition at line 124 of file FloatArray.cpp.

static void Window::rectangular ( float *  window,
int  size 
)
inlinestatic

Definition at line 63 of file Window.h.

Referenced by window().

void FloatArray::rectify ( FloatArray destination)
inherited

Absolute value of the array.

Stores the absolute value of the elements in the array into destination.

Parameters
[out]destinationthe destination array.
Note
When built for ARM Cortex-M processor series, this method uses the optimized CMSIS library

Definition at line 83 of file FloatArray.cpp.

References FloatArray::getData(), FloatArray::getSize(), and min.

void FloatArray::rectify ( )
inherited

Absolute value of the array.

Sets each element in the array to its absolute value.

Note
When built for ARM Cortex-M processor series, this method uses the optimized CMSIS library

Definition at line 95 of file FloatArray.cpp.

void FloatArray::reverse ( FloatArray destination)
inherited

Reverse the array Copies the elements of the array in reversed order into destination.

Parameters
[out]destinationthe destination array.

Definition at line 100 of file FloatArray.cpp.

References FloatArray::reverse().

Referenced by FloatArray::correlateInitialized().

void FloatArray::reverse ( )
inherited

Reverse the array.

Reverses the order of the elements in the array.

Definition at line 110 of file FloatArray.cpp.

Referenced by FloatArray::reverse().

void FloatArray::setAll ( float  value)
inherited

Set all the values in the array.

Sets all the elements of the array to value.

Parameters
[in]valueall the elements are set to this value.
Note
When built for ARM Cortex-M processor series, this method uses the optimized CMSIS library

Definition at line 286 of file FloatArray.cpp.

Referenced by FloatArray::clear(), and FloatArray::correlate().

void FloatArray::setElement ( int  index,
float  value 
)
inlineinherited

Set a single float in the FloatArray.

Definition at line 468 of file FloatArray.h.

FloatArray FloatArray::subArray ( int  offset,
size_t  length 
)
inherited

A subset of the array.

Returns a array that points to subset of the memory used by the original array.

Parameters
[in]offsetthe first element of the subset.
[in]lengththe number of elments in the new FloatArray.
Returns
the newly created FloatArray.
Remarks
no memory is allocated by this method. The memory is still shared with the original array. The memory should not be de-allocated elsewhere (e.g.: by calling FloatArray::destroy() on the original FloatArray) as long as the FloatArray returned by this method is still in use.
Calling FloatArray::destroy() on a FloatArray instance created with this method might cause an exception.

Definition at line 230 of file FloatArray.cpp.

References ASSERT, and FloatArray::FloatArray().

Referenced by FourierPitchDetector::computeFrequency().

void FloatArray::subtract ( FloatArray  operand2,
FloatArray  destination 
)
inherited

Element-wise difference between arrays.

Sets each element in destination to the difference between the corresponding element of the array and operand2

Parameters
[in]operand2second operand for the subtraction
[out]destinationthe destination array
Note
When built for ARM Cortex-M processor series, this method uses the optimized CMSIS library

Definition at line 324 of file FloatArray.cpp.

References ASSERT.

Referenced by FloatArray::subtract().

void FloatArray::subtract ( FloatArray  operand2)
inherited

Element-wise difference between arrays.

Subtracts from each element of the array the corresponding element in operand2.

Parameters
[in]operand2second operand for the subtraction
Note
When built for ARM Cortex-M processor series, this method uses the optimized CMSIS library

Definition at line 340 of file FloatArray.cpp.

References FloatArray::subtract().

void FloatArray::subtract ( float  scalar)
inherited

Array-scalar subtraction.

Subtracts scalar from the values in the array.

Parameters
scalarto be subtracted from the array

Definition at line 345 of file FloatArray.cpp.

void FloatArray::tanh ( FloatArray  destination)
inherited

Apply tanh to each element in the array.

Definition at line 510 of file FloatArray.cpp.

void FloatArray::tanh ( )
inherited

In-place tanh.

Definition at line 515 of file FloatArray.cpp.

static void Window::triangular ( float *  window,
int  size 
)
inlinestatic

Definition at line 75 of file Window.h.

References FloatArray::ramp().

Referenced by window().

static void Window::window ( WindowType  type,
float *  window,
int  size 
)
inlinestatic

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