1#ifndef SPIKE_TWOCOSINESIGNAL_H
2#define SPIKE_TWOCOSINESIGNAL_H
34 TwoCosineSignal(
double alpha,
double f1,
double beta,
double f2,
double phi,
55 [[nodiscard]]
double signal(
double t)
const;
57 void print(std::ostream &out)
const override {
58 out <<
"TwoCosineSignal(alpha: " << alpha <<
", f1: " << f1
59 <<
", beta: " << beta <<
", f2: " << f2 <<
", phi: " << phi <<
")";
An abstract base class for signals.
Definition Signal.h:20
const TimeFrame & time_frame
reference to time frame
Definition Signal.h:22
A time frame with discrete time steps.
Definition TimeFrame.h:13
Implements a signal consisting of two cosine, i.e. alpha*cos(2*pi*f1*t)
Definition TwoCosineSignal.h:16
TwoCosineSignal(double alpha, double f1, double beta, double f2, double phi, const TimeFrame &time_frame)
Construct TwoCosineSignal from parameters.
Definition TwoCosineSignal.cpp:13
void print(std::ostream &out) const override
Prints the signal to out stream.
Definition TwoCosineSignal.h:57
double signal(double t) const
Returns signal, i.e. alpha*cos(2*pi*f1*t) + beta*cos(2*pi*f2*t + phi)
Definition TwoCosineSignal.cpp:51
void calculate_signal()
Calculates the cosine signal.
Definition TwoCosineSignal.cpp:43