The Open Master Hearing Aid (openMHA)  openMHA
Open community platform for hearing aid algorithm research
dc_simple::dc_t::line_t Class Reference

Helper class for usage in computing compression, expansion and limiting. More...

Public Member Functions

 line_t (mha_real_t x1, mha_real_t y1, mha_real_t x2, mha_real_t y2)
 Constructor used for compression which takes two x and y coordinates each to find m and y0
More...
 
 line_t (mha_real_t x1, mha_real_t y1, mha_real_t m_)
 Constructor used for expansion and limiting which takes x and y coordinates and a gradient, giving y0. More...
 
mha_real_t operator() (mha_real_t x)
 Operator overload which returns. More...
 

Private Attributes

mha_real_t m
 The gradient and y-intercept. More...
 
mha_real_t y0
 

Detailed Description

Helper class for usage in computing compression, expansion and limiting.

Constructor & Destructor Documentation

◆ line_t() [1/2]

dc_simple::dc_t::line_t::line_t ( mha_real_t  x1,
mha_real_t  y1,
mha_real_t  x2,
mha_real_t  y2 
)

Constructor used for compression which takes two x and y coordinates each to find m and y0

◆ line_t() [2/2]

dc_simple::dc_t::line_t::line_t ( mha_real_t  x1,
mha_real_t  y1,
mha_real_t  m_ 
)

Constructor used for expansion and limiting which takes x and y coordinates and a gradient, giving y0.

Member Function Documentation

◆ operator()()

mha_real_t dc_simple::dc_t::line_t::operator() ( mha_real_t  x)
inline

Operator overload which returns.

Parameters
x
Returns
y values mapped to x by a linear equation with gradient m and intercept y0

Member Data Documentation

◆ m

mha_real_t dc_simple::dc_t::line_t::m
private

The gradient and y-intercept.

◆ y0

mha_real_t dc_simple::dc_t::line_t::y0
private

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