ldas-tools-filters  2.6.6
Public Member Functions | Private Attributes | List of all members
Filters::FIRLP Class Reference

#include <FIRLP.hh>

Public Member Functions

 FIRLP (const double fc=0.5, const int order=10, const Window &win=HannWindow())
 "Provide everything" constructor More...
 
 FIRLP (const FIRLP &firlp)
 Copy constructor. More...
 
 ~FIRLP ()
 Destructor. More...
 
const FIRLPoperator= (const FIRLP &rhs)
 Assignment operator. More...
 
double getFc () const
 Return pass-band edge. More...
 
int getOrder () const
 Return filter order. More...
 
void setOrder (const int order)
 Set order. More...
 
void setFc (const double fc)
 Set pass-band edge. More...
 
template<class T >
void apply (std::valarray< T > &tmp) const
 Design filter. More...
 
 FIRLP (const double fc=0.5, const int order=10, const Window &win=HannWindow())
 "Provide everything" constructor More...
 
 FIRLP (const FIRLP &firlp)
 Copy constructor. More...
 
 ~FIRLP ()
 Destructor. More...
 
const FIRLPoperator= (const FIRLP &rhs)
 Assignment operator. More...
 
double getFc () const
 Return pass-band edge. More...
 
int getOrder () const
 Return filter order. More...
 
void setOrder (const int order)
 Set order. More...
 
void setFc (const double fc)
 Set pass-band edge. More...
 
template<class T >
void apply (std::valarray< T > &tmp) const
 Design filter. More...
 
 FIRLP (const double fc=0.5, const int order=10, const Window &win=HannWindow())
 "Provide everything" constructor More...
 
 FIRLP (const FIRLP &firlp)
 Copy constructor. More...
 
 ~FIRLP ()
 Destructor. More...
 
const FIRLPoperator= (const FIRLP &rhs)
 Assignment operator. More...
 
double getFc () const
 Return pass-band edge. More...
 
int getOrder () const
 Return filter order. More...
 
void setOrder (const int order)
 Set order. More...
 
void setFc (const double fc)
 Set pass-band edge. More...
 
template<class T >
void apply (std::valarray< T > &tmp) const
 Design filter. More...
 

Private Attributes

size_t m_length
 length of window (order + 1) More...
 
double m_fc
 ratio of cutoff freq to Nyquist freq More...
 
std::unique_ptr< Windowm_win
 

Constructor & Destructor Documentation

◆ FIRLP() [1/6]

Filters::FIRLP::FIRLP ( const double  fc = 0.5,
const int  order = 10,
const Window win = HannWindow( ) 
)

"Provide everything" constructor

Parameters
[in]fcpass-band edge (Nyquist frequency units)
[in]orderfilter order
[in]winwindow for filter design
Exceptions
invalid_argumentif fc <= 0 or fc >= 1
invalid_argumentif t_order <= 0

◆ FIRLP() [2/6]

Filters::FIRLP::FIRLP ( const FIRLP firlp)

Copy constructor.

Parameters
[in]firlpFIRLP to duplicate

◆ ~FIRLP() [1/3]

Filters::FIRLP::~FIRLP ( )

Destructor.

◆ FIRLP() [3/6]

Filters::FIRLP::FIRLP ( const double  fc = 0.5,
const int  order = 10,
const Window win = HannWindow() 
)

"Provide everything" constructor

Parameters
[in]fcpass-band edge (Nyquist frequency units)
[in]orderfilter order
[in]winwindow for filter design
Exceptions
invalid_argumentif fc <= 0 or fc >= 1
invalid_argumentif t_order <= 0

◆ FIRLP() [4/6]

Filters::FIRLP::FIRLP ( const FIRLP firlp)

Copy constructor.

Parameters
[in]firlpFIRLP to duplicate

◆ ~FIRLP() [2/3]

Filters::FIRLP::~FIRLP ( )

Destructor.

◆ FIRLP() [5/6]

Filters::FIRLP::FIRLP ( const double  fc = 0.5,
const int  order = 10,
const Window win = HannWindow() 
)

"Provide everything" constructor

Parameters
[in]fcpass-band edge (Nyquist frequency units)
[in]orderfilter order
[in]winwindow for filter design
Exceptions
invalid_argumentif fc <= 0 or fc >= 1
invalid_argumentif t_order <= 0

◆ FIRLP() [6/6]

Filters::FIRLP::FIRLP ( const FIRLP firlp)

Copy constructor.

Parameters
[in]firlpFIRLP to duplicate

◆ ~FIRLP() [3/3]

Filters::FIRLP::~FIRLP ( )

Destructor.

Member Function Documentation

◆ apply() [1/3]

template<class T >
void Filters::FIRLP::apply ( std::valarray< T > &  tmp) const

Design filter.

Parameters
[in,out]transferfunction coefficients

◆ apply() [2/3]

template<class T >
void Filters::FIRLP::apply ( std::valarray< T > &  tmp) const

Design filter.

Parameters
[in,out]transferfunction coefficients

◆ apply() [3/3]

template<class T >
void Filters::FIRLP::apply ( std::valarray< T > &  tmp) const

Design filter.

Parameters
[in,out]transferfunction coefficients

◆ getFc() [1/3]

double Filters::FIRLP::getFc ( ) const
inline

Return pass-band edge.

Returns
pass band edge as fraction of Nyquist frequency

◆ getFc() [2/3]

double Filters::FIRLP::getFc ( ) const

Return pass-band edge.

Returns
pass band edge as fraction of Nyquist frequency

◆ getFc() [3/3]

double Filters::FIRLP::getFc ( ) const

Return pass-band edge.

Returns
pass band edge as fraction of Nyquist frequency

◆ getOrder() [1/3]

int Filters::FIRLP::getOrder ( ) const
inline

Return filter order.

Returns
filter order (length - 1)

◆ getOrder() [2/3]

int Filters::FIRLP::getOrder ( ) const

Return filter order.

Returns
filter order (length - 1)

◆ getOrder() [3/3]

int Filters::FIRLP::getOrder ( ) const

Return filter order.

Returns
filter order (length - 1)

◆ operator=() [1/3]

const FIRLP & Filters::FIRLP::operator= ( const FIRLP rhs)

Assignment operator.

Parameters
[in]rhsinstance to be assigned

◆ operator=() [2/3]

const FIRLP& Filters::FIRLP::operator= ( const FIRLP rhs)

Assignment operator.

Parameters
[in]rhsinstance to be assigned

◆ operator=() [3/3]

const FIRLP& Filters::FIRLP::operator= ( const FIRLP rhs)

Assignment operator.

Parameters
[in]rhsinstance to be assigned

◆ setFc() [1/3]

void Filters::FIRLP::setFc ( const double  fc)

Set pass-band edge.

Parameters
[in]pass-bandedge as fraction of Nyquist frequncy
Exceptions
iffc <= 0 or fc >= 1

◆ setFc() [2/3]

void Filters::FIRLP::setFc ( const double  fc)

Set pass-band edge.

Parameters
[in]pass-bandedge as fraction of Nyquist frequncy
Exceptions
iffc <= 0 or fc >= 1

◆ setFc() [3/3]

void Filters::FIRLP::setFc ( const double  fc)

Set pass-band edge.

Parameters
[in]pass-bandedge as fraction of Nyquist frequncy
Exceptions
iffc <= 0 or fc >= 1

◆ setOrder() [1/3]

void Filters::FIRLP::setOrder ( const int  order)

Set order.

param[in] new filter order

Exceptions
iforder <= 0

◆ setOrder() [2/3]

void Filters::FIRLP::setOrder ( const int  order)

Set order.

param[in] new filter order

Exceptions
iforder <= 0

◆ setOrder() [3/3]

void Filters::FIRLP::setOrder ( const int  order)

Set order.

param[in] new filter order

Exceptions
iforder <= 0

Member Data Documentation

◆ m_fc

double Filters::FIRLP::m_fc
private

ratio of cutoff freq to Nyquist freq

◆ m_length

size_t Filters::FIRLP::m_length
private

length of window (order + 1)

◆ m_win

std::unique_ptr< Window > Filters::FIRLP::m_win
private

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