FormulaSineWave¶
-
class
FormulaSineWave
: public feasst::Formula¶ \(y = shift + amplitude*\sin(2\pi (x - phase)/ width)\)
Public Functions
-
FormulaSineWave
(const argtype &args = argtype())¶ args:
amplitude: the amplitude (deviation from “average”) of the wave (default: 1).
width: the width of the periodicity, w, in x units (default: 2 \(\pi\)).
phase: shift the wave to the right in units of x (default: 0).
shift: shift the wave up in units of y (default: documented below).
-
double
amplitude
() const¶ Return the amplitude.
-
double
width
() const¶ Return the width.
-
double
phase
() const¶ Return the phase.
-
double
default_shift
() const¶ Return the default value for the shift input argument.
-
double
shift
() const¶ Return the phase.
-
double
nearest_minimum
(const double x) const¶ Return the x-value of the minimum nearest to the point with the given x-value.
-
double
nearest_maximum
(const double x) const¶ Same as above, but for maximum.
-