Spike
Loading...
Searching...
No Matches
Spike::Signal Class Referenceabstract

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 TimeFrametime_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.
 

Detailed Description

An abstract base class for signals.

Constructor & Destructor Documentation

◆ Signal()

Spike::Signal::Signal ( const TimeFrame & time_frame)
explicit

Constructs signal from given time frame.

Parameters
time_frameTime frame

Member Function Documentation

◆ get_value()

double Spike::Signal::get_value ( size_t i) const

Returns the signal value at index i.

Parameters
itime index
Returns
signal value

◆ print()

virtual void Spike::Signal::print ( std::ostream & out) const
pure virtual

Prints the signal to out stream.

Parameters
outout stream

Implemented in Spike::CosineSignal, Spike::StepSignal, Spike::TwoCosineSignal, and Spike::WhiteNoiseSignal.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & out,
const Signal & signal )
friend

Overloads the << operator so we can print signal to out.

Parameters
outout stream
signalsignal
Returns
out stream

The documentation for this class was generated from the following files: