13#include "Spike/TimeFrame/TimeFrame.h"
37 [[nodiscard]]
double get_value(
size_t i)
const;
43 virtual void print(std::ostream &out)
const = 0;
An abstract base class for signals.
Definition Signal.h:20
friend std::ostream & operator<<(std::ostream &out, const Signal &signal)
Overloads the << operator so we can print signal to out.
Definition Signal.cpp:12
Signal(const TimeFrame &time_frame)
Constructs signal from given time frame.
Definition Signal.cpp:5
const TimeFrame & time_frame
reference to time frame
Definition Signal.h:22
std::vector< double > signal_values
array containing the signal values
Definition Signal.h:23
virtual void print(std::ostream &out) const =0
Prints the signal to out stream.
double get_value(size_t i) const
Returns the signal value at index i.
Definition Signal.cpp:10
A time frame with discrete time steps.
Definition TimeFrame.h:13