inlib  1.2.0
Public Member Functions
inlib::func::cauchy Class Reference

List of all members.

Public Member Functions

 cauchy (double a_height=1, double a_center=0, double a_width=1)
virtual ~cauchy ()
 cauchy (const cauchy &a_from)
cauchyoperator= (const cauchy &a_from)
bool in_domain (double) const
double value (double a_x) const
void set (double a_height, double a_center, double a_width)
void height (double a_height)
void center (double a_center)
void width (double a_width)
double height () const
double center () const
double width () const

Detailed Description

Definition at line 180 of file func.


Constructor & Destructor Documentation

inlib::func::cauchy::cauchy ( double  a_height = 1,
double  a_center = 0,
double  a_width = 1 
) [inline]

Definition at line 182 of file func.

                                                                    {
    set(a_height,a_center,a_width);
  }
virtual inlib::func::cauchy::~cauchy ( ) [inline, virtual]

Definition at line 185 of file func.

{}
inlib::func::cauchy::cauchy ( const cauchy a_from) [inline]

Definition at line 187 of file func.

  :m_height(a_from.m_height)
  ,m_center(a_from.m_center)
  ,m_width(a_from.m_width)
  {}

Member Function Documentation

void inlib::func::cauchy::center ( double  a_center) [inline]

Definition at line 214 of file func.

{m_center = a_center;}
double inlib::func::cauchy::center ( ) const [inline]

Definition at line 220 of file func.

{return m_center;}
void inlib::func::cauchy::height ( double  a_height) [inline]

Definition at line 213 of file func.

{m_height = a_height;}
double inlib::func::cauchy::height ( ) const [inline]

Definition at line 219 of file func.

{return m_height;}
bool inlib::func::cauchy::in_domain ( double  ) const [inline]

Definition at line 199 of file func.

{return true;}
cauchy& inlib::func::cauchy::operator= ( const cauchy a_from) [inline]

Definition at line 192 of file func.

                                         {
    m_height = a_from.m_height;
    m_center = a_from.m_center;
    m_width = a_from.m_width;
    return *this;
  }
void inlib::func::cauchy::set ( double  a_height,
double  a_center,
double  a_width 
) [inline]

Definition at line 207 of file func.

                                                          {
    m_height = a_height;
    m_center = a_center;
    m_width = a_width;
    if(m_width<=0) m_width = 1;
  }
double inlib::func::cauchy::value ( double  a_x) const [inline]

Definition at line 200 of file func.

                                 {
    // From Wikipedia.
    double b = m_width/2.;
    double value = (a_x - m_center)/b;
    return m_height/((value * value + 1)*b*inlib::pi());
  }
void inlib::func::cauchy::width ( double  a_width) [inline]

Definition at line 215 of file func.

                            {
    m_width = a_width;
    if(m_width<=0) m_width = 1;
  }
double inlib::func::cauchy::width ( ) const [inline]

Definition at line 221 of file func.

{return m_width;}

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines