AbstractTimeSeriesInterp.h
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file AbstractTimeSeriesInterp.h
22 
23  \brief This file contains an abstract class for interpolation functions
24  or interpolators that estimate values at non-observaved times of a
25  time series.
26 */
27 
28 #ifndef __TERRALIB_ST_INTERNAL_ABSTRACTTIMESERIESINTERP_H
29 #define __TERRALIB_ST_INTERNAL_ABSTRACTTIMESERIESINTERP_H
30 
31 // ST
32 #include "../../Config.h"
33 
34 //STL
35 #include <memory>
36 
37 // Forward declarations
38 namespace te { namespace dt { class DateTime; class AbstractData; } }
39 namespace te { namespace common { class AbstractParameters; } }
40 
41 namespace te
42 {
43  namespace st
44  {
45  // Forward declarations
46  class TimeSeries;
47 
48  /*!
49  \class AbstractTimeSeriesInterp
50 
51  \brief An abstract class for an interpolation function or interpolator
52  that estimate a value at non-observaved times of a time series.
53 
54  This is an abstract class for every class that implements
55  interpolation functions that estimate value at non-observaved times
56  of a time series.
57 
58  \ingroup st
59 
60  \sa Time Series
61  */
63  {
64 
65  public:
66 
67  /*!
68  \brief It gets the parameters associated to the interpolator.
69 
70  \return It returns the parameters associated to the interpolator.
71 
72  \note The caller will not take the ownership of the returned pointer.
73  */
74  virtual te::common::AbstractParameters* getParams() = 0;
75 
76  /*!
77  \brief It sets the parameters associated to the interpolator.
78 
79  \param p The parameters to be associated to the interpolator.
80 
81  \note It will take the ownership of the given pointer.
82  */
83  virtual void setParams(te::common::AbstractParameters* p) = 0;
84 
85  /*!
86  \brief It estimates a value at a given non-observed time of a time series.
87 
88  \param ts A time series used in the estimation.
89  \param time The given non-observed time.
90 
91  \return The estimated value.
92 
93  \note It will NOT take the ownership of the given pointer.
94  \note The caller will take the ownership of the output pointer.
95  */
96  virtual std::auto_ptr<te::dt::AbstractData> estimate(const TimeSeries& ts, te::dt::DateTime* time) const = 0;
97 
98  /*! \brief Virtual destructor. */
99  virtual ~AbstractTimeSeriesInterp();
100 
101  protected:
102 
103  /*! \brief Constructor. */
105  };
106 
107  } // end namespace st
108 } // end namespace te
109 
110 #endif // __TERRALIB_ST_INTERNAL_ABSTRACTTIMESERIESINTERP_H
111 
#define TESTEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:88
URI C++ Library.
Abstract parameters base interface.
An abstract class for an interpolation function or interpolator that estimate a value at non-observav...
A class to represent time series.
Definition: TimeSeries.h:66