#ifndef SUNRISE_SIGNAL_MODEL_04_12_2007 #define SUNRISE_SIGNAL_MODEL_04_12_2007 /** @class SunriseModel.h @author Brian Magill @creationdate 4/12/2007 @brief primative model of a sunrise signal */ #include #include class SunriseModel { private: double ampl; unsigned long length; unsigned long topInd; unsigned long minInd; public: SunriseModel(double a = 10., unsigned long N = 21, unsigned long top = 5, unsigned long min = 15):ampl(a), length(N), topInd(top), minInd(min) { assert(minInd < N); assert(topInd < minInd); }; SunriseModel(SunriseModel const &rhs):ampl(rhs.ampl), length(rhs.length), topInd(rhs.topInd), minInd(rhs.minInd) {}; ~SunriseModel() { }; SunriseModel const& operator = (SunriseModel const& rhs) { if (this == &rhs) return *this; ampl = rhs.ampl; length = rhs.length; topInd = rhs.topInd; minInd = rhs.minInd; return *this; }; long size() const {return length;} ; double getAmplitude() const {return ampl;}; long getTopIndex() const {return topInd;}; long getMinIndex() const {return minInd;}; std::valarray getModel() const; void getModel(std::valarray &A) const; }; #endif