tsfuncs.h

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

Generated on Fri Jul 4 15:30:21 2008 for GPLIB++ by  doxygen 1.5.5