| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/stat/TeMSVFactory.h
Go to the documentation of this file.

    00001 /************************************************************************************
    00002 TerraLib - a library for developing GIS applications.
    00003 Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
    00004
    00005 This code is part of the TerraLib library.
    00006 This library is free software; you can redistribute it and/or
    00007 modify it under the terms of the GNU Lesser General Public
    00008 License as published by the Free Software Foundation; either
    00009 version 2.1 of the License, or (at your option) any later version.
    00010
    00011 You should have received a copy of the GNU Lesser General Public
    00012 License along with this library.
    00013
    00014 The authors reassure the license terms regarding the warranties.
    00015 They specifically disclaim any warranties, including, but not limited to,
    00016 the implied warranties of merchantability and fitness for a particular purpose.
    00017 The library provided hereunder is on an "as is" basis, and the authors have no
    00018 obligation to provide maintenance, support, updates, enhancements, or modifications.
    00019 In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
    00020 indirect, special, incidental, or consequential damages arising out of the use
    00021 of this library and its documentation.
    00022 *************************************************************************************/
    00026 #ifndef __TERRALIB_INTERNAL_SPATIALMEASUREFACTORY_H
    00027 #define __TERRALIB_INTERNAL_SPATIALMEASUREFACTORY_H
    00028
    00029 #ifdef WIN32
    00030 #pragma warning ( disable: 4786 )
    00031 #endif
    00032
    00033
    00034 #include <map>
    00035 #include <string>
    00036 #include "../kernel/TeMatrix.h"
    00037 #include "../kernel/TeFactory.h"
    00038
    00039 #include "TeStatDefines.h"
    00040
    00041 using namespace std;
    00042
    00047
    00048 struct STAT_DLL TeMSVParams
    00049 {
    00050            TeMatrix   MSVPmatrix_;
    00051            double                MSVPdir_;
    00052            double                MSVPtoldir_;
    00053            double                MSVPincr_;
    00054            double                MSVPnlag_;
    00055
    00056            virtual string decName() const { return ""; }
    00057 };
    00058
    00060 class STAT_DLL TeMSV
    00061 {
    00062 public:
    00063            TeMSV (){};
    00064            virtual ~TeMSV () {}
    00065
    00066            virtual TeMatrix      calculate ()=0;
    00067            static TeMSV* DefaultObject(TeMSVParams){ return 0; }
    00068            void setMatrix(TeMatrix* m) {MSVmatrix_ = m;}
    00069
    00070 protected:
    00071            TeMatrix*  MSVmatrix_;
    00072            double                MSVdir_;
    00073            double                MSVtoldir_;
    00074            double                MSVincr_;
    00075            double                MSVnlag_;
    00076 };
    00077
    00078
    00080 class STAT_DLL TeSemivariogram : public TeMSV
    00081 {
    00082 public:
    00083            TeSemivariogram(const TeMSVParams& params){
    00084                       MSVdir_ = params.MSVPdir_;
    00085                       MSVtoldir_ = params.MSVPtoldir_;
    00086                       MSVincr_ = params.MSVPincr_;
    00087                       MSVnlag_ = params.MSVPnlag_;
    00088            }
    00089
    00090            ~TeSemivariogram() { }
    00091
    00092            virtual TeMatrix      calculate ();
    00093 };
    00094
    00095
    00097 class STAT_DLL TeCorrelogram : public TeMSV
    00098 {
    00099 public:
    00100                       TeCorrelogram(const TeMSVParams& params){
    00101                       MSVdir_ = params.MSVPdir_;
    00102                       MSVtoldir_ = params.MSVPtoldir_;
    00103                       MSVincr_ = params.MSVPincr_;
    00104                       MSVnlag_ = params.MSVPnlag_;
    00105            }
    00106
    00107            ~TeCorrelogram(){};
    00108
    00109            virtual TeMatrix      calculate ();
    00110 };
    00111
    00113 class STAT_DLL TeSemimadogram : public TeMSV
    00114 {
    00115 public:
    00116                       TeSemimadogram(const TeMSVParams& params){
    00117                       MSVdir_ = params.MSVPdir_;
    00118                       MSVtoldir_ = params.MSVPtoldir_;
    00119                       MSVincr_ = params.MSVPincr_;
    00120                       MSVnlag_ = params.MSVPnlag_;
    00121            }
    00122
    00123            ~TeSemimadogram(){};
    00124
    00125            virtual TeMatrix      calculate ();
    00126 };
    00127
    00129 class STAT_DLL TeCovariance : public TeMSV
    00130 {
    00131 public:
    00132                       TeCovariance(const TeMSVParams& params){
    00133                       MSVdir_ = params.MSVPdir_;
    00134                       MSVtoldir_ = params.MSVPtoldir_;
    00135                       MSVincr_ = params.MSVPincr_;
    00136                       MSVnlag_ = params.MSVPnlag_;
    00137            }
    00138
    00139            ~TeCovariance(){};
    00140
    00141            virtual TeMatrix      calculate ();
    00142 };
    00143
    00144
    00146 class STAT_DLL TeMSVFactory : public TeFactory<TeMSV, TeMSVParams>
    00147 {
    00148 public:
    00149            TeMSVFactory(const string& name) : TeFactory<TeMSV, TeMSVParams>(name){}
    00150            virtual TeMSV* build(const TeMSVParams&) = 0;
    00151 };
    00152
    00153
    00155 class STAT_DLL TeSemivariogram_Factory : public TeMSVFactory
    00156 {
    00157 public:
    00158            TeSemivariogram_Factory (const string& name) : TeMSVFactory(name){}
    00159
    00160            virtual TeMSV* build(const TeMSVParams& params){return new TeSemivariogram(params);}
    00161 };
    00162
    00163
    00165 class STAT_DLL TeCorrelogram_Factory : public TeMSVFactory
    00166 {
    00167 public:
    00168            TeCorrelogram_Factory (const string& name) : TeMSVFactory (name){}
    00169
    00170            virtual TeMSV* build (const TeMSVParams& params){return new TeCorrelogram(params);}
    00171 };
    00172
    00173
    00175 class STAT_DLL TeSemimadogram_Factory : public TeMSVFactory
    00176 {
    00177 public:
    00178            TeSemimadogram_Factory (const string& name) : TeMSVFactory (name){}
    00179
    00180            virtual TeMSV* build (const TeMSVParams& params){return new TeSemimadogram(params);}
    00181 };
    00182
    00183
    00185 class STAT_DLL TeCovariance_Factory : public TeMSVFactory
    00186 {
    00187 public:
    00188            TeCovariance_Factory (const string& name) : TeMSVFactory (name){}
    00189
    00190            virtual TeMSV* build (const TeMSVParams& params){return new TeCovariance(params);}
    00191 };
    00193 #endif
    00194
    00195

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines