#include <Sinusoid.hpp>
Public Member Functions |
| Sinusoid (const double magnitude, const double frequency, const unsigned ramp_period=1) |
| Compute the sinuoidal signal using , where when , and when .
|
virtual double | getValue (const double x) const |
| Evaluate the function at x.
|
virtual void | setScale (const double x) |
virtual double | getDf (const double x) const |
| Evaluate the first-order derivative at x.
|
virtual double | getFrequency () const |
| return the central frequency
|
int | getType () const |
virtual | ~Sinusoid () |
| Function () |
double | rtnewt (const double x1, const double x2, const double xacc) const |
| Use the Newton-Raphson method, find the root of a function known to line in the interval [x1, x2].
|
double | rtsecan (double xn_1, double xn, const double xacc) const |
| o * Use the secant method to find the root of a function with the initial guess at xn_1 and xn.
|
virtual | ~Function () |
Private Attributes |
double | f_c |
double | A |
unsigned | n |
Constructor & Destructor Documentation
Sinusoid::Sinusoid |
( |
const double |
magnitude, |
|
|
const double |
frequency, |
|
|
const unsigned |
ramp_period = 1 |
|
) |
| |
virtual Sinusoid::~Sinusoid |
( |
| ) |
|
|
inlinevirtual |
Member Function Documentation
double Sinusoid::getDf |
( |
const double |
x | ) |
const |
|
virtual |
Evaluate the first-order derivative at x.
Reimplemented from Function.
double Sinusoid::getFrequency |
( |
| ) |
const |
|
virtual |
return the central frequency
Reimplemented from Function.
int Sinusoid::getType |
( |
| ) |
const |
double Sinusoid::getValue |
( |
const double |
x | ) |
const |
|
virtual |
Evaluate the function at x.
Reimplemented from Function.
void Sinusoid::setScale |
( |
const double |
x | ) |
|
|
virtual |
Member Data Documentation
The documentation for this class was generated from the following files: