SigPack - the C++ signal processing library
sp::Delay< T1 > Class Template Reference

#include <timing.h>

Collaboration diagram for sp::Delay< T1 >:
Collaboration graph

Public Member Functions

 Delay ()
 
 Delay (const arma::uword _D)
 
 ~Delay ()
 
void clear (void)
 
void set_delay (const arma::uword _D)
 
T1 operator() (const T1 &in)
 
arma::Col< T1 > delay (const arma::Col< T1 > &in)
 

Private Attributes

arma::uword D
 
arma::uword cur_p
 
arma::Col< T1 > buf
 

Detailed Description

template<class T1>
class sp::Delay< T1 >

Implements different timing related functions such as delay

Examples:
fir_iir.cpp.

Definition at line 18 of file timing.h.

Constructor & Destructor Documentation

◆ Delay() [1/2]

template<class T1>
sp::Delay< T1 >::Delay ( )
inline

Constructor.

Definition at line 28 of file timing.h.

◆ Delay() [2/2]

template<class T1>
sp::Delay< T1 >::Delay ( const arma::uword  _D)
inline

Constructor with delay input.

Parameters
_Ddelay

Definition at line 38 of file timing.h.

References sp::Delay< T1 >::clear(), and sp::Delay< T1 >::set_delay().

Here is the call graph for this function:

◆ ~Delay()

template<class T1>
sp::Delay< T1 >::~Delay ( )
inline

Destructor.

Definition at line 47 of file timing.h.

Member Function Documentation

◆ clear()

template<class T1>
void sp::Delay< T1 >::clear ( void  )
inline

Clears internal state.

Definition at line 52 of file timing.h.

Referenced by sp::Delay< T1 >::Delay().

◆ delay()

template<class T1>
arma::Col<T1> sp::Delay< T1 >::delay ( const arma::Col< T1 > &  in)
inline

A delay operator (vector version).

Parameters
invector input

Definition at line 88 of file timing.h.

Referenced by main().

◆ operator()()

template<class T1>
T1 sp::Delay< T1 >::operator() ( const T1 &  in)
inline

A delay operator.

Parameters
insample input

Definition at line 72 of file timing.h.

References sp::Delay< T1 >::cur_p.

◆ set_delay()

template<class T1>
void sp::Delay< T1 >::set_delay ( const arma::uword  _D)
inline

Sets delay.

Parameters
_Ddelay

Definition at line 62 of file timing.h.

Referenced by sp::Delay< T1 >::Delay().

Member Data Documentation

◆ buf

template<class T1>
arma::Col<T1> sp::Delay< T1 >::buf
private

Signal buffer.

Definition at line 23 of file timing.h.

◆ cur_p

template<class T1>
arma::uword sp::Delay< T1 >::cur_p
private

Pointer to current sample in buffer.

Definition at line 22 of file timing.h.

Referenced by sp::Delay< T1 >::operator()().

◆ D

template<class T1>
arma::uword sp::Delay< T1 >::D
private

The delay value.

Definition at line 21 of file timing.h.


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