5#ifndef SPIKE_COSINESIGNAL_H
6#define SPIKE_COSINESIGNAL_H
49 [[nodiscard]]
double signal(
double t)
const;
55 [[nodiscard]]
double get_f()
const {
return this->f; };
61 void print(std::ostream &out)
const override {
62 out <<
"CosineSignal(alpha: " << alpha <<
", f: " << f <<
")";
Implements a cosine signal, i.e. alpha*cos(2*pi*f*t)
Definition CosineSignal.h:18
double get_f() const
Returns the frequency.
Definition CosineSignal.h:55
CosineSignal(double alpha, double f, const TimeFrame &time_frame)
Construct CosineSignal from parameters.
Definition CosineSignal.cpp:13
double signal(double t) const
Returns signal at time t, i.e. alpha*cos(2*pi*f*t)
Definition CosineSignal.cpp:45
void calculate_signal()
Calculates the cosine signal, i.e. alpha*cos(2*pi*f*t).
Definition CosineSignal.cpp:38
void print(std::ostream &out) const override
Prints cosine signal to out stream.
Definition CosineSignal.h:61
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