GeostatisticalModel.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 terralib/sa/core/GeostatisticalModel.h
22 
23  \brief This file contains a virtual class that represents the geostatistical model.
24 
25  \reference Adapted from TerraLib4.
26 */
27 
28 #ifndef __TERRALIB_SA_INTERNAL_GEOSTATISTICALMODEL_H
29 #define __TERRALIB_SA_INTERNAL_GEOSTATISTICALMODEL_H
30 
31 // Terralib Includes
32 #include "../Config.h"
33 #include "../Enums.h"
34 
35 // STL Includes
36 #include <memory>
37 
38 // Boost
39 #include <boost/numeric/ublas/matrix.hpp>
40 
41 namespace te
42 {
43  namespace sa
44  {
45  /*!
46  \class GeostatisticalModel
47 
48  \brief The empirical variogram cannot be computed at every lag distance h and due to variation in the estimation
49  it is not ensured that it is a valid variogram, as defined above. However some Geostatistical methods
50  such as kriging need valid semivariograms. In applied geostatistics the empirical variograms are thus
51  often approximated by model function ensuring validity (Chiles&Delfiner 1999).
52 
53  \sa GeostatisticalMethod
54  */
56  {
57  public:
58 
59  /*! \brief Default constructor. */
61  {
62  m_nugget = 0.;
63  m_sill = 0.;
64  m_range = 0.;
65  };
66 
67  /*! \brief Virtual destructor. */
68  virtual ~GeostatisticalModel(){};
69 
70  public:
71 
72  /*! \brief Function to calculate the geostatistical information from model. */
73  virtual boost::numeric::ublas::matrix<double> calculate(boost::numeric::ublas::matrix<double> matrix) = 0;
74 
75  /*! \brief Function to set the nugget value. */
76  void setNugget(double value)
77  {
78  m_nugget = value;
79  }
80 
81  /*! \brief Function to get the nugget value. */
82  double getNugget()
83  {
84  return m_nugget;
85  }
86 
87  /*! \brief Function to set the sill value. */
88  void setSill(double value)
89  {
90  m_sill = value;
91  }
92 
93  /*! \brief Function to get the sill value. */
94  double getSill()
95  {
96  return m_sill;
97  }
98 
99  /*! \brief Function to set the range value. */
100  void setRange(double value)
101  {
102  m_range = value;
103  }
104 
105  /*! \brief Function to get the range value. */
106  double getRange()
107  {
108  return m_range;
109  }
110 
111  protected:
112 
113  double m_nugget; //!< The height of the jump of the semivariogram at the discontinuity at the origin.
114 
115  double m_sill; //!< Limit of the variogram tending to infinity lag distances.
116 
117  double m_range; //!< The distance in which the difference of the variogram from the sill becomes negligible.
118 
119  te::sa::GeostatisticalModelType m_type; //!< Attribute used to define the model type used.
120 
121  };
122  } // end namespace sa
123 } // end namespace te
124 
125 #endif //__TERRALIB_SA_INTERNAL_GEOSTATISTICALMODEL_H
void setSill(double value)
Function to set the sill value.
double m_nugget
The height of the jump of the semivariogram at the discontinuity at the origin.
double m_sill
Limit of the variogram tending to infinity lag distances.
The empirical variogram cannot be computed at every lag distance h and due to variation in the estima...
double getSill()
Function to get the sill value.
GeostatisticalModel()
Default constructor.
double getNugget()
Function to get the nugget value.
URI C++ Library.
virtual ~GeostatisticalModel()
Virtual destructor.
GeostatisticalModelType
Geostatistical models for measure of Spatial Variability.
Definition: Enums.h:136
#define TESAEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:133
te::sa::GeostatisticalModelType m_type
Attribute used to define the model type used.
double getRange()
Function to get the range value.
double m_range
The distance in which the difference of the variogram from the sill becomes negligible.
void setNugget(double value)
Function to set the nugget value.
void setRange(double value)
Function to set the range value.