ldas-tools-filters
2.6.6
|
An abstract base class for window functions. More...
#include <Window.hh>
Public Member Functions | |
Window () | |
\breif Default constructor | |
virtual | ~Window () |
Destructor. | |
const Window & | operator= (const Window &r) |
Copy assignment. More... | |
size_t | size () const |
Return window length. More... | |
double | mean () const |
Return mean value of window. More... | |
double | rms () const |
Return RMS value of window. More... | |
virtual std::string | name () const =0 |
Return window name. More... | |
virtual double | param () const =0 |
Return window parameter. More... | |
void | resize (const size_t n) |
Change the size of the window. More... | |
template<class T > | |
void | apply (std::valarray< T > &x) |
Apply a window to the data in-place. More... | |
template<class TOut , class TIn > | |
void | apply (std::valarray< TOut > &out, const std::valarray< TIn > &in) |
Apply a window to the data out-of-place. More... | |
template<class TOut , class TIn > | |
void | operator() (std::valarray< TOut > &out, const std::valarray< TIn > &in) |
Synonym for apply. More... | |
virtual Window * | Clone () const =0 |
Clone a window. More... | |
Window () | |
\breif Default constructor | |
virtual | ~Window () |
Destructor. | |
const Window & | operator= (const Window &r) |
Copy assignment. More... | |
size_t | size () const |
Return window length. More... | |
double | mean () const |
Return mean value of window. More... | |
double | rms () const |
Return RMS value of window. More... | |
virtual std::string | name () const =0 |
Return window name. More... | |
virtual double | param () const =0 |
Return window parameter. More... | |
void | resize (const size_t n) |
Change the size of the window. More... | |
template<class T > | |
void | apply (std::valarray< T > &x) |
Apply a window to the data in-place. More... | |
template<class TOut , class TIn > | |
void | apply (std::valarray< TOut > &out, const std::valarray< TIn > &in) |
Apply a window to the data out-of-place. More... | |
template<class TOut , class TIn > | |
void | operator() (std::valarray< TOut > &out, const std::valarray< TIn > &in) |
Synonym for apply. More... | |
virtual Window * | Clone () const =0 |
Clone a window. More... | |
Window () | |
\breif Default constructor | |
virtual | ~Window () |
Destructor. | |
const Window & | operator= (const Window &r) |
Copy assignment. More... | |
size_t | size () const |
Return window length. More... | |
double | mean () const |
Return mean value of window. More... | |
double | rms () const |
Return RMS value of window. More... | |
virtual std::string | name () const =0 |
Return window name. More... | |
virtual double | param () const =0 |
Return window parameter. More... | |
void | resize (const size_t n) |
Change the size of the window. More... | |
template<class T > | |
void | apply (std::valarray< T > &x) |
Apply a window to the data in-place. More... | |
template<class TOut , class TIn > | |
void | apply (std::valarray< TOut > &out, const std::valarray< TIn > &in) |
Apply a window to the data out-of-place. More... | |
template<class TOut , class TIn > | |
void | operator() (std::valarray< TOut > &out, const std::valarray< TIn > &in) |
Synonym for apply. More... | |
virtual Window * | Clone () const =0 |
Clone a window. More... | |
Protected Member Functions | |
void | populate () |
Populate the elements of the window. More... | |
void | populate () |
Populate the elements of the window. More... | |
void | populate () |
Populate the elements of the window. More... | |
An abstract base class for window functions.
void Filters::Window::apply | ( | std::valarray< T > & | x | ) |
Apply a window to the data in-place.
[in,out] | x | input/output sequence |
std::length_error | thrown if desired window length is greater than maximum allowed value |
std::bad_alloc | thrown if not able to allocate memory for window |
void Filters::Window::apply | ( | std::valarray< T > & | x | ) |
Apply a window to the data in-place.
[in,out] | x | input/output sequence |
std::length_error | thrown if desired window length is greater than maximum allowed value |
std::bad_alloc | thrown if not able to allocate memory for window |
void Filters::Window::apply | ( | std::valarray< T > & | x | ) |
Apply a window to the data in-place.
[in,out] | x | input/output sequence |
std::length_error | thrown if desired window length is greater than maximum allowed value |
std::bad_alloc | thrown if not able to allocate memory for window |
void Filters::Window::apply | ( | std::valarray< TOut > & | out, |
const std::valarray< TIn > & | in | ||
) |
Apply a window to the data out-of-place.
[out] | out | windowed sequence |
[in] | in | input sequence |
std::length_error | thrown if desired window length is greater than maximum allowed value |
std::bad_alloc | thrown if not able to allocate memory for window |
void Filters::Window::apply | ( | std::valarray< TOut > & | out, |
const std::valarray< TIn > & | in | ||
) |
Apply a window to the data out-of-place.
[out] | out | windowed sequence |
[in] | in | input sequence |
std::length_error | thrown if desired window length is greater than maximum allowed value |
std::bad_alloc | thrown if not able to allocate memory for window |
void Filters::Window::apply | ( | std::valarray< TOut > & | out, |
const std::valarray< TIn > & | in | ||
) |
Apply a window to the data out-of-place.
[out] | out | windowed sequence |
[in] | in | input sequence |
std::length_error | thrown if desired window length is greater than maximum allowed value |
std::bad_alloc | thrown if not able to allocate memory for window |
|
pure virtual |
Clone a window.
Implemented in Filters::RectangularWindow, Filters::KaiserWindow, Filters::HannWindow, Filters::RectangularWindow, Filters::KaiserWindow, Filters::HannWindow, Filters::RectangularWindow, Filters::KaiserWindow, and Filters::HannWindow.
|
pure virtual |
Clone a window.
Implemented in Filters::RectangularWindow, Filters::KaiserWindow, Filters::HannWindow, Filters::RectangularWindow, Filters::KaiserWindow, Filters::HannWindow, Filters::RectangularWindow, Filters::KaiserWindow, and Filters::HannWindow.
|
pure virtual |
Clone a window.
Implemented in Filters::RectangularWindow, Filters::KaiserWindow, Filters::HannWindow, Filters::RectangularWindow, Filters::KaiserWindow, Filters::HannWindow, Filters::RectangularWindow, Filters::KaiserWindow, and Filters::HannWindow.
|
inline |
Return mean value of window.
double Filters::Window::mean | ( | ) | const |
Return mean value of window.
double Filters::Window::mean | ( | ) | const |
Return mean value of window.
|
pure virtual |
Return window name.
Implemented in Filters::RectangularWindow, Filters::KaiserWindow, Filters::HannWindow, Filters::RectangularWindow, Filters::KaiserWindow, Filters::HannWindow, Filters::RectangularWindow, Filters::KaiserWindow, and Filters::HannWindow.
|
pure virtual |
Return window name.
Implemented in Filters::RectangularWindow, Filters::KaiserWindow, Filters::HannWindow, Filters::RectangularWindow, Filters::KaiserWindow, Filters::HannWindow, Filters::RectangularWindow, Filters::KaiserWindow, and Filters::HannWindow.
|
pure virtual |
Return window name.
Implemented in Filters::RectangularWindow, Filters::KaiserWindow, Filters::HannWindow, Filters::RectangularWindow, Filters::KaiserWindow, Filters::HannWindow, Filters::RectangularWindow, Filters::KaiserWindow, and Filters::HannWindow.
void Filters::Window::operator() | ( | std::valarray< TOut > & | out, |
const std::valarray< TIn > & | in | ||
) |
Synonym for apply.
[out] | out | windowed sequence |
[in] | in | input sequence |
std::length_error | thrown if desired window length is greater than maximum allowed value |
std::bad_alloc | thrown if not able to allocate memory for window |
void Filters::Window::operator() | ( | std::valarray< TOut > & | out, |
const std::valarray< TIn > & | in | ||
) |
Synonym for apply.
[out] | out | windowed sequence |
[in] | in | input sequence |
std::length_error | thrown if desired window length is greater than maximum allowed value |
std::bad_alloc | thrown if not able to allocate memory for window |
void Filters::Window::operator() | ( | std::valarray< TOut > & | out, |
const std::valarray< TIn > & | in | ||
) |
Synonym for apply.
[out] | out | windowed sequence |
[in] | in | input sequence |
std::length_error | thrown if desired window length is greater than maximum allowed value |
std::bad_alloc | thrown if not able to allocate memory for window |
|
pure virtual |
Return window parameter.
Implemented in Filters::RectangularWindow, Filters::KaiserWindow, Filters::HannWindow, Filters::RectangularWindow, Filters::KaiserWindow, Filters::HannWindow, Filters::RectangularWindow, Filters::KaiserWindow, and Filters::HannWindow.
|
pure virtual |
Return window parameter.
Implemented in Filters::RectangularWindow, Filters::KaiserWindow, Filters::HannWindow, Filters::RectangularWindow, Filters::KaiserWindow, Filters::HannWindow, Filters::RectangularWindow, Filters::KaiserWindow, and Filters::HannWindow.
|
pure virtual |
Return window parameter.
Implemented in Filters::RectangularWindow, Filters::KaiserWindow, Filters::HannWindow, Filters::RectangularWindow, Filters::KaiserWindow, Filters::HannWindow, Filters::RectangularWindow, Filters::KaiserWindow, and Filters::HannWindow.
|
protected |
Populate the elements of the window.
This function will usually need to be called by a derived class whenever the the window is changed in any way which affects the element() function, such as when some window parameter is altered.
|
protected |
Populate the elements of the window.
This function will usually need to be called by a derived class whenever the the window is changed in any way which affects the element() function, such as when some window parameter is altered.
|
protected |
Populate the elements of the window.
This function will usually need to be called by a derived class whenever the the window is changed in any way which affects the element() function, such as when some window parameter is altered.
void Filters::Window::resize | ( | const size_t | n | ) |
Change the size of the window.
[in] | n | desired length of window |
std::length_error | thrown if desired window length is greater than maximum allowed value |
std::bad_alloc | thrown if not able to allocate memory for the window |
void Filters::Window::resize | ( | const size_t | n | ) |
Change the size of the window.
[in] | n | desired length of window |
std::length_error | thrown if desired window length is greater than maximum allowed value |
std::bad_alloc | thrown if not able to allocate memory for the window |
void Filters::Window::resize | ( | const size_t | n | ) |
Change the size of the window.
[in] | n | desired length of window |
std::length_error | thrown if desired window length is greater than maximum allowed value |
std::bad_alloc | thrown if not able to allocate memory for the window |
|
inline |
Return RMS value of window.
double Filters::Window::rms | ( | ) | const |
Return RMS value of window.
double Filters::Window::rms | ( | ) | const |
Return RMS value of window.
|
inline |
Return window length.
size_t Filters::Window::size | ( | ) | const |
Return window length.
size_t Filters::Window::size | ( | ) | const |
Return window length.