Loading...
Searching...
No Matches
BayesLocalOperation.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/BayesLocalOperation.h
22
23 \brief This file contains a class that represents the bayes global operation.
24
25 \reference Adapted from TerraLib4.
26*/
27
28#ifndef __TERRALIB_SA_INTERNAL_BAYESLOCALOPERATION_H
29#define __TERRALIB_SA_INTERNAL_BAYESLOCALOPERATION_H
30
31// Terralib Includes
32#include "../Config.h"
33#include "BayesParams.h"
34
35// STL Includes
36#include <map>
37#include <memory>
38
39
40namespace te
41{
42 //forward declarations
43 namespace da { class DataSetType; }
44 namespace gm { class Geometry; }
45 namespace mem { class DataSet; }
46
47 namespace sa
48 {
49 /*!
50 \class BayesGlobalOperation
51
52 \brief Class used to execute the bayes global operations
53
54 */
56 {
57 public:
58
59 /*! \brief Default constructor. */
61
62 /*! \brief Virtual destructor. */
64
65 public:
66
67 /*! \brief Function to execute the bayes operation. */
68 void execute();
69
71
72 protected:
73
74 /*! Function used to save the output dataset */
76
77 /*! Function used to create the output dataset type */
78 std::unique_ptr<te::da::DataSetType> createDataSetType(te::da::DataSetType* dsType);
79
80 /*! Function used to create the output dataset */
81 std::unique_ptr<te::mem::DataSet> createDataSet(te::da::DataSet* inputDataSet, te::da::DataSetType* dsType);
82
83 void runBayesLocal(te::mem::DataSet* ds, std::size_t idIdx, std::size_t eventIdx, std::size_t popIdx,
84 std::size_t neighEventIdx, std::size_t neighPopIdx, std::size_t bayesIdx, std::size_t gpmEventIdx, std::size_t gpmPopIdx);
85
86 protected:
87
88 std::unique_ptr<te::sa::BayesInputParams> m_inputParams; //!< Attribute with the bayes input parameters.
89
90 std::unique_ptr<te::sa::BayesOutputParams> m_outputParams; //!< Attribute with the bayes output parameters.
91 };
92 } // end namespace sa
93} // end namespace te
94
95#endif //__TERRALIB_SA_INTERNAL_BAYESLOCALOPERATION_H
This file contains a class that represents the Bayes parameters.
A class that models the description of a dataset.
Definition: DataSetType.h:73
A dataset is the unit of information manipulated by the data access module of TerraLib.
Definition: DataSet.h:114
Implementation of a random-access dataset class for the TerraLib In-Memory Data Access driver.
Definition: DataSet.h:66
Class that represents the Bayes input parameters.
Definition: BayesParams.h:57
std::unique_ptr< te::mem::DataSet > createDataSet(te::da::DataSet *inputDataSet, te::da::DataSetType *dsType)
void saveDataSet(te::da::DataSet *dataSet, te::da::DataSetType *dsType)
void runBayesLocal(te::mem::DataSet *ds, std::size_t idIdx, std::size_t eventIdx, std::size_t popIdx, std::size_t neighEventIdx, std::size_t neighPopIdx, std::size_t bayesIdx, std::size_t gpmEventIdx, std::size_t gpmPopIdx)
void execute()
Function to execute the bayes operation.
BayesLocalOperation()
Default constructor.
std::unique_ptr< te::sa::BayesOutputParams > m_outputParams
Attribute with the bayes output parameters.
std::unique_ptr< te::da::DataSetType > createDataSetType(te::da::DataSetType *dsType)
std::unique_ptr< te::sa::BayesInputParams > m_inputParams
Attribute with the bayes input parameters.
~BayesLocalOperation()
Virtual destructor.
void setParameters(te::sa::BayesInputParams *inParams, te::sa::BayesOutputParams *outParams)
Class that represents the Bayes output parameters.
Definition: BayesParams.h:95
TerraLib.
#define TESAEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:133