Commit 4eba7a68 authored by thomas.forbriger's avatar thomas.forbriger
Browse files

libpsdxx [WP]: rename Taper -> LogTaper

parent 12729e45
...@@ -120,7 +120,7 @@ namespace psd { ...@@ -120,7 +120,7 @@ namespace psd {
/*! \brief Taper function class /*! \brief Taper function class
*/ */
class Taper class LogTaper
{ {
private: private:
/*! Indicate location of center of taper /*! Indicate location of center of taper
...@@ -131,16 +131,16 @@ namespace psd { ...@@ -131,16 +131,16 @@ namespace psd {
Flower_end=(1<<2), //!< largest frequency index Flower_end=(1<<2), //!< largest frequency index
}; // enum Eedge }; // enum Eedge
public: public:
Taper(const psd::TDseries::Tcoc& f, LogTaper(const psd::TDseries::Tcoc& f,
const unsigned int& i); const unsigned int& i);
~Taper(); ~LogTaper();
double operator()(const double& f); double operator()(const double& f);
double sum() const { return(Msum); } double sum() const { return(Msum); }
private: private:
double Msum; double Msum;
LogIndex* Mli; LogIndex* Mli;
Eedge Mloc; Eedge Mloc;
}; // class Taper }; // class LogTaper
} // namespace helper } // namespace helper
......
...@@ -41,8 +41,8 @@ namespace psd { ...@@ -41,8 +41,8 @@ namespace psd {
namespace helper { namespace helper {
Taper::Taper(const psd::TDseries::Tcoc& f, LogTaper::LogTaper(const psd::TDseries::Tcoc& f,
const unsigned int& i): Msum(0) const unsigned int& i): Msum(0)
{ {
PSDXX_assert(f.size()>2, PSDXX_assert(f.size()>2,
"at least three values of frequency are required"); "at least three values of frequency are required");
...@@ -62,19 +62,19 @@ namespace psd { ...@@ -62,19 +62,19 @@ namespace psd {
this->Mli=new psd::helper::LogIndex(f(f.f()+i-1), this->Mli=new psd::helper::LogIndex(f(f.f()+i-1),
f(f.f()+i), f(f.f()+i+1)); f(f.f()+i), f(f.f()+i+1));
} }
} // Taper::Taper(const psd::TDseries::Tcoc& f, } // LogTaper::LogTaper(const psd::TDseries::Tcoc& f,
// const unsigned int& i) // const unsigned int& i)
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
Taper::~Taper() LogTaper::~LogTaper()
{ {
delete Mli; delete Mli;
} // Taper::~Taper() } // LogTaper::~LogTaper()
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
double Taper::operator()(const double& f) double LogTaper::operator()(const double& f)
{ {
double retval=0; double retval=0;
double rindex=this->Mli->operator()(f); double rindex=this->Mli->operator()(f);
...@@ -127,7 +127,7 @@ namespace psd { ...@@ -127,7 +127,7 @@ namespace psd {
this->Msum += retval; this->Msum += retval;
return(retval); return(retval);
} // double Taper::operator()(const double& f) const } // double LogTaper::operator()(const double& f) const
} // namespace helper } // namespace helper
......
...@@ -31,7 +31,8 @@ using std::endl; ...@@ -31,7 +31,8 @@ using std::endl;
struct Options struct Options
{ {
bool verbose, logfrequency, logindex; bool verbose, logfrequency, logindex, logtaper;
int taperindex;
}; // Options }; // Options
/* ====================================================================== */ /* ====================================================================== */
...@@ -55,7 +56,7 @@ int main(int iargc, char* argv[]) ...@@ -55,7 +56,7 @@ int main(int iargc, char* argv[])
char usage_text[]= char usage_text[]=
{ {
TESTPSDXX_VERSION "\n" TESTPSDXX_VERSION "\n"
"usage: testpsdxx [-lf] [-li]" "\n" "usage: testpsdxx [-lf] [-li] [-lt [i]]" "\n"
" or: testpsdxx --help|-h" "\n" " or: testpsdxx --help|-h" "\n"
}; };
...@@ -63,6 +64,8 @@ int main(int iargc, char* argv[]) ...@@ -63,6 +64,8 @@ int main(int iargc, char* argv[])
char help_text[]= char help_text[]=
{ {
"-lf test function log_frequency" "-lf test function log_frequency"
"-li test function class LogIndex"
"-lt test function class LogTaper"
}; };
// define commandline options // define commandline options
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment