tsfuncs.h

Go to the documentation of this file.
00001 #include <math.h>
00002 
00003 namespace gplib
00004   {
00005     /** \addtogroup mttools MT data analysis, processing and inversion */
00006     /* @{ */
00007 
00008     inline bool IsSpikeAbsolute(const double prediff, const double postdiff,
00009         const double currvalue, const double Threshold)
00010       {
00011         if ((prediff * postdiff < 0) && (currvalue > Threshold))
00012           return (true);
00013         else
00014           return (false);
00015       }
00016 
00017     inline bool IsSpikePreRel(const double prediff, const double postdiff,
00018         const double currvalue, const double Threshold)
00019       {
00020         if ((prediff * postdiff < 0) && (std::abs(prediff) > Threshold))
00021           return (true);
00022         else
00023           return (false);
00024       }
00025 
00026     inline bool IsSpikePostRel(const double prediff, const double postdiff,
00027         const double currvalue, const double Threshold)
00028       {
00029         if ((prediff * postdiff < 0) && (std::abs(postdiff) > Threshold))
00030           return (true);
00031         else
00032           return (false);
00033       }
00034 
00035     inline bool IsSpikeAnyRel(const double prediff, const double postdiff,
00036         const double currvalue, const double Threshold)
00037       {
00038         if ((prediff * postdiff < 0) && ((std::abs(postdiff) > Threshold) || (fabs(
00039             prediff) > Threshold)))
00040           return (true);
00041         else
00042           return (false);
00043       }
00044 
00045     inline bool IsSpikeBothRel(const double prediff, const double postdiff,
00046         const double currvalue, const double Threshold)
00047       {
00048         if ((prediff * postdiff < 0) && ((std::abs(postdiff) > Threshold) && (fabs(
00049             prediff) > Threshold)))
00050           return (true);
00051         else
00052           return (false);
00053 
00054       }
00055   /* @} */
00056   }

Generated on Tue May 4 16:52:15 2010 for GPLIB++ by  doxygen 1.5.8