#ifndef DFunct1_HH #define DFunct1_HH //////////////////////////////////////////////////////////////////////// //! file="amma/Signals/Signal1/DFunct1.hh" //! lib=Msignal //! author="Radek Marik" //! date="20.10.95" //! docentry="Signal Processing" //! rcsid="$Id: DFunct1.hh,v 1.7 1999/12/02 11:24:23 ees1cg Exp $" #include "amma/ReArr1d.hh" class istream; class ostream; //====================================================================== //======== DFunction1dC ================================================ //====================================================================== //! userlevel=Normal //: 1 Dimensional function // The class DFunction1dC represents an uniformly sampled one dimensional // function. The samples can be accessed using an integer index. class DFunction1dC: public RealArray1dC { public: // Constructors, copies, assigment, and desctructor. // ------------------------------------------------- inline DFunction1dC(const SizeT dim); // Creates a not-initialized function with the index range <0, 'dim'-1>. inline DFunction1dC(const IndexRangeC & range); // Creates a not-initialized function with the index // range <'range'.Min(), 'range'.Max()> inline DFunction1dC(const DFunction1dC & s); // Creates another access to the function 's'. inline DFunction1dC(const RealArray1dC & s); // The function is attached to the array of doubles 's'. inline DFunction1dC(const DFunction1dC & vv, const IndexRangeC & r); // Creates the access to the part of the function 'vv' of the index // range 'r'. inline DFunction1dC(RealT * data, const IndexRangeC & range); // The function is created from the memory location 'data' // with the range of access in <'range'.Min(), 'range'.Max()>. // the memory 'data' is not deallocated during destructing of the array. DFunction1dC(const char * fileName); // Creates a function from the file 'fileName'. DFunction1dC(istream & s); // A function is created from the input stream 's'. inline DFunction1dC Copy() const; // Creates a copy of the function. // Generators of functions. // ------------------------ static DFunction1dC Gauss(MaskSizeT len, RealT tau); // Creates the array containing Gaussian. // Special operations. // ------------------- inline DFunction1dC Enlarge(const IntT f) const; // Enlarges the array by item duplications. Every item is duplicated // 'factor' times. The return array is extended by adding of higher // indexes. DFunction1dC & Convolution(const DFunction1dC & f); // Convolves this function with the function 'f'. // The result is stored in the original function. }; ostream & operator<<(ostream & s, const DFunction1dC & f); // Writes the one dimensional function 'f' into the output stream 's'. #include // -------------------------------------------------------------------- // **************** DFunction1dC ************************************** // -------------------------------------------------------------------- inline DFunction1dC::DFunction1dC(const SizeT dim) //========================================== : RealArray1dC(dim) {} inline DFunction1dC::DFunction1dC(const IndexRangeC & range) //=================================================== : RealArray1dC(range) {} inline DFunction1dC::DFunction1dC(const DFunction1dC & vv) //================================================= : RealArray1dC(vv) {} inline DFunction1dC::DFunction1dC(const RealArray1dC & a) //================================================ : RealArray1dC(a) {} inline DFunction1dC::DFunction1dC(const DFunction1dC & vv, const IndexRangeC & range) //=================================================== : RealArray1dC(vv,range) {} inline DFunction1dC::DFunction1dC(RealT * data, const IndexRangeC & range) //=================================================== : RealArray1dC(data,range) {} inline DFunction1dC DFunction1dC::Copy() const //======================== { return RealArray1dC::Copy(); } inline DFunction1dC DFunction1dC::Enlarge(const IntT f) const //========================================= { return RealArray1dC::Enlarge(f); } #endif // End of the include file DFunct1.hh