| 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/TeSemivarModelFactory.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 *************************************************************************************/
    00027 #ifndef __TERRALIB_INTERNAL_SEMIVARMODEL_H
    00028 #define __TERRALIB_INTERNAL_SEMIVARMODEL_H
    00029
    00030 #ifdef WIN32
    00031 #pragma warning ( disable: 4786 )
    00032 #endif
    00033
    00034 #include "../kernel/TeMatrix.h"
    00035 #include "../kernel/TeFactory.h"
    00036
    00037 #include "TeStatDefines.h"
    00038
    00043
    00044 struct STAT_DLL TeSemivarModelParams
    00045 {
    00046            double                efeitopepita_;
    00047            double                contribuicao_;
    00048            double                alcance_;
    00049
    00050            virtual string decName() const { return ""; }
    00051 };
    00052
    00053
    00055 class STAT_DLL TeSemivarModel
    00056 {
    00057 public:
    00058            TeSemivarModel (){};
    00059            virtual ~TeSemivarModel (){};
    00060
    00061            virtual TeMatrix      calculate (TeMatrix&)=0;
    00062            static TeSemivarModel* DefaultObject(TeSemivarModelParams){ return 0; }
    00063
    00064 protected:
    00065            double                modeloefeitopepita_;
    00066            double                modelocontribuicao_;
    00067            double                modeloalcance_;
    00068 };
    00069
    00071 class STAT_DLL TeEsfericSemivarModel : public TeSemivarModel
    00072 {
    00073 public:
    00074                       TeEsfericSemivarModel(const TeSemivarModelParams& params){
    00075                       modeloefeitopepita_ = params.efeitopepita_;
    00076                       modelocontribuicao_ = params.contribuicao_;
    00077                       modeloalcance_ = params.alcance_;
    00078            }
    00079
    00080            virtual ~TeEsfericSemivarModel(){};
    00081
    00082            virtual TeMatrix      calculate (TeMatrix&);
    00083 };
    00084
    00086 class STAT_DLL TeExponentialSemivarModel : public TeSemivarModel
    00087 {
    00088 public:
    00089                       TeExponentialSemivarModel(const TeSemivarModelParams& params){
    00090                       modeloefeitopepita_ = params.efeitopepita_;
    00091                       modelocontribuicao_ = params.contribuicao_;
    00092                       modeloalcance_ = params.alcance_;
    00093            }
    00094
    00095            virtual ~TeExponentialSemivarModel(){};
    00096
    00097            virtual TeMatrix      calculate (TeMatrix&);
    00098 };
    00099
    00101 class STAT_DLL TeGaussianSemivarModel : public TeSemivarModel
    00102 {
    00103 public:
    00104                       TeGaussianSemivarModel(const TeSemivarModelParams& params){
    00105                       modeloefeitopepita_ = params.efeitopepita_;
    00106                       modelocontribuicao_ = params.contribuicao_;
    00107                       modeloalcance_ = params.alcance_;
    00108            }
    00109
    00110            virtual ~TeGaussianSemivarModel(){};
    00111
    00112            virtual TeMatrix      calculate (TeMatrix&);
    00113 };
    00114
    00116 class STAT_DLL TeSemivarModelFactory : public TeFactory<TeSemivarModel, TeSemivarModelParams>
    00117 {
    00118 public:
    00119            TeSemivarModelFactory( const string& name) : TeFactory<TeSemivarModel, TeSemivarModelParams>(name){}
    00120
    00121            virtual TeSemivarModel* build( const TeSemivarModelParams&) = 0;
    00122 };
    00123
    00124
    00126 class STAT_DLL TeEsfericSemivar_Factory : public TeSemivarModelFactory
    00127 {
    00128 public:
    00129            TeEsfericSemivar_Factory (const string& name) : TeSemivarModelFactory(name){}
    00130
    00131            virtual TeSemivarModel* build(const TeSemivarModelParams& params){return new TeEsfericSemivarModel(params);}
    00132 };
    00133
    00134
    00136 class STAT_DLL TeExponentialSemivar_Factory : public TeSemivarModelFactory
    00137 {
    00138 public:
    00139            TeExponentialSemivar_Factory (const string& name) : TeSemivarModelFactory(name){}
    00140
    00141            virtual TeSemivarModel* build(const TeSemivarModelParams& params){return new TeExponentialSemivarModel(params);}
    00142 };
    00143
    00144
    00146 class STAT_DLL TeGaussianSemivar_Factory : public TeSemivarModelFactory
    00147 {
    00148 public:
    00149            TeGaussianSemivar_Factory (const string& name) : TeSemivarModelFactory(name){}
    00150
    00151            virtual TeSemivarModel* build(const TeSemivarModelParams& params){return new TeGaussianSemivarModel(params);}
    00152 };
    00156 #endif
    00157
    00158

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines