Spike
|
An abstract base class for signals. More...
#include <Signal.h>
Public Member Functions | |
Signal (const TimeFrame &time_frame) | |
Constructs signal from given time frame. | |
double | get_value (size_t i) const |
Returns the signal value at index i. | |
virtual void | print (std::ostream &out) const =0 |
Prints the signal to out stream. | |
Protected Attributes | |
const TimeFrame & | time_frame |
reference to time frame | |
std::vector< double > | signal_values |
array containing the signal values | |
Friends | |
std::ostream & | operator<< (std::ostream &out, const Signal &signal) |
Overloads the << operator so we can print signal to out. | |
An abstract base class for signals.
|
explicit |
Constructs signal from given time frame.
time_frame | Time frame |
double Spike::Signal::get_value | ( | size_t | i | ) | const |
Returns the signal value at index i.
i | time index |
|
pure virtual |
Prints the signal to out stream.
out | out stream |
Implemented in Spike::CosineSignal, Spike::StepSignal, Spike::TwoCosineSignal, and Spike::WhiteNoiseSignal.
|
friend |
Overloads the << operator so we can print signal to out.
out | out stream |
signal | signal |