TS++ library: time series library
ipo.h
Go to the documentation of this file.
1 
40 // include guard
41 #ifndef TF_IPO_H_VERSION
42 
43 #define TF_IPO_H_VERSION \
44  "TF_IPO_H V1.2"
45 
46 #include<tsxx/tsxx.h>
47 #include<tsxx/error.h>
48 #include<tsxx/wid2timeseries.h>
49 
50 namespace ts {
51 
63  namespace ipo {
64 
71  {
72  public:
73  ExceptionTimeWindowOutside(const char* message,
74  const char* file,
75  const int& line,
76  const char* condition);
77  }; // class ExceptionTimeWindowOutside
78 
89  {
90  public:
91  ExceptionTimeWindowEmpty(const char* message,
92  const char* file,
93  const int& line,
94  const char* condition);
95  }; // class ExceptionTimeWindowEmpty
96 
113  class Interpolator {
114  public:
120  virtual ~Interpolator() { }
121  virtual Tvalue operator()(const libtime::TAbsoluteTime& t) const =0;
122  Theader header() const { return(Mts.header); }
123  Tconst_series series() const { return(Mts); }
124  Tconst_timeseries timeseries() const { return(Mts); }
126  bool debug() const { return(Mdebug); }
127  protected:
128  Interpolator(Tconst_timeseries ts, const bool& debug=false):
129  Mts(ts), Mdebug(debug) { }
132  private:
134  bool Mdebug;
135  }; // class Interpolator
136 
166  const libtime::TAbsoluteTime& first,
167  const libtime::TRelativeTime& dt,
168  const int& n,
169  const bool& shrink=false);
170 
171  } // namespace ipo
172 
173 } // namespace ts
174 
175 #endif // TF_IPO_H_VERSION (includeguard)
176 
177 /* ----- END OF ipo.h ----- */
Tconst_timeseries Mts
here we hold a copy
Definition: ipo.h:131
virtual Tvalue operator()(const libtime::TAbsoluteTime &t) const =0
Exception in case time windows are not overlapping.
Definition: ipo.h:69
void first(const Tseries &s)
Definition: seifexx.cc:117
Tconst_timeseries::Theader Theader
Definition: ipo.h:118
Base class for exceptions.
Definition: error.h:60
Exception in case resulting time window is empty.
Definition: ipo.h:87
Ttimeseries::Tvalue Tvalue
Definition: ipo.h:119
Theader header() const
Definition: ipo.h:122
error handling for libtsxx (prototypes)
bool Mdebug
produce debug output
Definition: ipo.h:134
Interface to time series interpolator.
Definition: ipo.h:113
Structure to hold the data samples of a series together with header information to form a time series...
Definition: tsxx.h:83
Tconst_timeseries timeseries() const
Definition: ipo.h:124
ts::TDsfftimeseries resample(const Interpolator &ip, const libtime::TAbsoluteTime &first, const libtime::TRelativeTime &dt, const int &n, const bool &shrink)
resample a time series
Definition: ipo.cc:72
All stuff in this library will be placed within namespace ts.
Definition: anyfilter.cc:43
Theader header
data header fields
Definition: tsxx.h:134
bool debug() const
indicate whether interpolator is in debug mode
Definition: ipo.h:126
time series with WID2 header (prototypes)
basic modules of time series library in C++ (prototypes)
Tconst_series series() const
Definition: ipo.h:123
ts::TDsfftimeseries Ttimeseries
Definition: ipo.h:115
Tseries::Tvalue Tvalue
Definition: tsxx.h:95
ExceptionTimeWindowEmpty(const char *message, const char *file, const int &line, const char *condition)
Definition: ipo.cc:61
virtual ~Interpolator()
Definition: ipo.h:120
ExceptionTimeWindowOutside(const char *message, const char *file, const int &line, const char *condition)
Definition: ipo.cc:50
Tconst_timeseries::Tseries Tconst_series
Definition: ipo.h:117
Ttimeseries::Tconsttimeseries Tconst_timeseries
Definition: ipo.h:116
Interpolator(Tconst_timeseries ts, const bool &debug=false)
Definition: ipo.h:128