source.h
Go to the documentation of this file.
#ifndef SOURCE_H
#define SOURCE_H
#include <itpp/base/vec.h>
#include <itpp/itexports.h>
namespace itpp
{
class ITPP_EXPORT Sine_Source
{
public:
Sine_Source(double freq, double mean = 0.0, double ampl = 1.0, double inphase = 0.0);
double operator()() { return sample(); }
vec operator()(int n);
mat operator()(int h, int w);
protected:
private:
double sample();
double m, A, theta, dtheta;
};
class ITPP_EXPORT Square_Source
{
public:
Square_Source(double freq, double mean = 0.0, double ampl = 1.0, double inphase = 0.0);
double operator()() { return sample(); }
vec operator()(int n);
mat operator()(int h, int w);
protected:
private:
double sample();
double m, A, theta, dtheta;
};
class ITPP_EXPORT Triangle_Source
{
public:
Triangle_Source(double freq, double mean = 0.0, double ampl = 1.0, double inphase = 0.0);
double operator()() { return sample(); }
vec operator()(int n);
mat operator()(int h, int w);
protected:
private:
double sample();
double m, A, theta, dtheta;
};
class ITPP_EXPORT Sawtooth_Source
{
public:
Sawtooth_Source(double freq, double mean = 0.0, double ampl = 1.0, double inphase = 0.0);
double operator()() { return sample(); }
vec operator()(int n);
mat operator()(int h, int w);
protected:
private:
double sample();
double m, A, theta, dtheta;
};
class ITPP_EXPORT Impulse_Source
{
public:
Impulse_Source(double freq, double ampl = 1.0, double inphase = 0.0);
double operator()() { return sample(); }
vec operator()(int n);
mat operator()(int h, int w);
protected:
private:
double sample();
double A, pos, dtheta;
};
class ITPP_EXPORT Pattern_Source
{
public:
Pattern_Source(const vec &pattern, int start_pos = 0);
virtual ~Pattern_Source() { }
double operator()() { return sample(); }
vec operator()(int n);
mat operator()(int h, int w);
protected:
private:
double sample();
int pos;
vec pat;
double mean, var;
};
} //namespace itpp
#endif // #ifndef SOURCE_H
itpp::Array
General array class.
Definition array.h:105
itpp::Array::operator()
T & operator()(int i)
Get the i element.
Definition array.h:290
itpp::Impulse_Source
Impulse source.
Definition source.h:129
itpp::Impulse_Source::operator()
double operator()()
Return a single sample.
Definition source.h:134
itpp::Pattern_Source
Pattern source.
Definition source.h:150
itpp::Pattern_Source::operator()
double operator()()
Return a single sample.
Definition source.h:157
itpp::Pattern_Source::~Pattern_Source
virtual ~Pattern_Source()
Destructor.
Definition source.h:155
itpp::Sawtooth_Source
Sawtooth-wave source.
Definition source.h:108
itpp::Sawtooth_Source::operator()
double operator()()
Return a single sample.
Definition source.h:113
itpp::Sine_Source
Sine-wave source.
Definition source.h:45
itpp::Sine_Source::operator()
double operator()()
Return a single sample.
Definition source.h:50
itpp::Square_Source
Square-wave source.
Definition source.h:66
itpp::Square_Source::operator()
double operator()()
Return a single sample.
Definition source.h:71
itpp::Triangle_Source
Triangle-wave source.
Definition source.h:87
itpp::Triangle_Source::operator()
double operator()()
Return a single sample.
Definition source.h:92
itpp::mean
double mean(const vec &v)
The mean value.
Definition misc_stat.cpp:36
itpp
itpp namespace
Definition itmex.h:37
vec.h
Templated Vector Class Definitions.

Generated on Mon Jun 10 2024 11:49:25 for IT++ by Doxygen 1.9.8