Simbody 3.7
|
This is a Function_ subclass whose output value is a sinusoid of its argument: f(x) = a*sin(w*x + p) where a is amplitude, w is frequency in radians per unit of x, p is phase in radians. More...
#include <Function.h>
Public Member Functions | |
Sinusoid (Real amplitude, Real frequency, Real phase=0) | |
Create a Function::Sinusoid object, returning a*sin(w*x+p). | |
void | setAmplitude (Real amplitude) |
void | setFrequency (Real frequency) |
void | setPhase (Real phase) |
Real | getAmplitude () const |
Real | getFrequency () const |
Real | getPhase () const |
virtual Real | calcValue (const Vector &x) const override |
virtual Real | calcDerivative (const Array_< int > &derivComponents, const Vector &x) const override |
int | getArgumentSize () const override |
int | getMaxDerivativeOrder () const override |
Sinusoid * | clone () const override |
Real | calcDerivative (const std::vector< int > &derivComponents, const Vector &x) const |
This provides compatibility with std::vector without requiring any copying. | |
This is a Function_ subclass whose output value is a sinusoid of its argument: f(x) = a*sin(w*x + p) where a is amplitude, w is frequency in radians per unit of x, p is phase in radians.
This is only defined for a scalar (Real) return value.
|
inline |
Create a Function::Sinusoid object, returning a*sin(w*x+p).
[in] | amplitude | 'a' in the above formula |
[in] | frequency | 'w' in the above formula |
[in] | phase | 'p' in the above formula (default is zero) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverride |
|
inlineoverride |
|
inlineoverride |
|
inline |
This provides compatibility with std::vector without requiring any copying.