Loading...
Searching...
No Matches
SkaterParams.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/SkaterParams.h
22
23 \brief This file contains a class that represents the skater parameters.
24
25 \reference Adapted from TerraLib4.
26*/
27
28#ifndef __TERRALIB_SA_INTERNAL_SKATERPARAMS_H
29#define __TERRALIB_SA_INTERNAL_SKATERPARAMS_H
30
31// Terralib Includes
32#include "../../dataaccess/dataset/DataSet.h"
33#include "../../dataaccess/dataset/DataSetType.h"
34#include "../../dataaccess/datasource/DataSource.h"
35#include "../Config.h"
36#include "../Enums.h"
38
39// STL Includes
40#include <memory>
41#include <string>
42#include <vector>
43
44namespace te
45{
46 namespace sa
47 {
48 /*!
49 \class SkaterInputParams
50
51 \brief Class that represents the skater input parameters.
52
53 \sa SkaterOperation
54 */
55
57 {
58 public:
59
60 /*! \brief Default constructor. */
62 {
63 m_gpmAttrLink = "";
64 m_nClusters = 0;
65 m_minPop = 0;
66 m_attrPop = "";
67 }
68
69 /*! \brief Virtual destructor. */
71 {
72 m_attrs.clear();
73 }
74
75 public:
76
77 std::unique_ptr<te::da::DataSetType> m_dsType; //!< Attribute used to access the data set metadata
78 std::unique_ptr<te::da::DataSet> m_ds; //!< Attribute with data set
79 std::unique_ptr<te::sa::GeneralizedProximityMatrix> m_gpm; //!< Attribute with graph information
80 std::string m_gpmAttrLink; //!< Attribute from dataset that was used to generate the gpm.
81
83 std::size_t m_nClusters; //!< Number of clusters (Aggregation type = Clusters)
84 std::size_t m_minPop; //!< Number of minimum population (Aggregation type = Population)
85 std::string m_attrPop; //!< Attribute used to represent the population (Aggregation type = Population)
86
87 std::vector<std::string> m_attrs; //!< List of attributes selected to calculate the weight of the edge
88 };
89
90 /*!
91 \class SkaterOutputParams
92
93 \brief Class that represents the skater output parameters.
94
95 \sa SkaterOperation
96 */
97
99 {
100 public:
101
102 /*! \brief Default constructor. */
104 {
105 m_outputDataSetName = "";
106 }
107
108 /*! \brief Virtual destructor. */
110 {
111 }
112
113 public:
114
115 te::da::DataSourcePtr m_dataSource; //!< Pointer to the output data source
116
117 std::string m_outputDataSetName; //!< Attribute that defines the output dataset name
118 };
119 } // end namespace sa
120} // end namespace te
121
122#endif //__TERRALIB_SA_INTERNAL_SKATERPARAMS_H
This class defines the GPM class.
Class that represents the skater input parameters.
Definition: SkaterParams.h:57
std::unique_ptr< te::da::DataSet > m_ds
Attribute with data set.
Definition: SkaterParams.h:78
SkaterInputParams()
Default constructor.
Definition: SkaterParams.h:61
std::unique_ptr< te::da::DataSetType > m_dsType
Attribute used to access the data set metadata.
Definition: SkaterParams.h:77
~SkaterInputParams()
Virtual destructor.
Definition: SkaterParams.h:70
std::size_t m_minPop
Number of minimum population (Aggregation type = Population)
Definition: SkaterParams.h:84
std::vector< std::string > m_attrs
List of attributes selected to calculate the weight of the edge.
Definition: SkaterParams.h:87
std::string m_attrPop
Attribute used to represent the population (Aggregation type = Population)
Definition: SkaterParams.h:85
std::size_t m_nClusters
Number of clusters (Aggregation type = Clusters)
Definition: SkaterParams.h:83
te::sa::SkaterAggregationType m_aggregType
Aggregation type.
Definition: SkaterParams.h:82
std::unique_ptr< te::sa::GeneralizedProximityMatrix > m_gpm
Attribute with graph information.
Definition: SkaterParams.h:79
std::string m_gpmAttrLink
Attribute from dataset that was used to generate the gpm.
Definition: SkaterParams.h:80
Class that represents the skater output parameters.
Definition: SkaterParams.h:99
SkaterOutputParams()
Default constructor.
Definition: SkaterParams.h:103
te::da::DataSourcePtr m_dataSource
Pointer to the output data source.
Definition: SkaterParams.h:115
std::string m_outputDataSetName
Attribute that defines the output dataset name.
Definition: SkaterParams.h:117
~SkaterOutputParams()
Virtual destructor.
Definition: SkaterParams.h:109
boost::shared_ptr< DataSource > DataSourcePtr
Definition: DataSource.h:1449
SkaterAggregationType
Skater aggregation types used to partition the spanning tree.
Definition: Enums.h:150
TerraLib.
#define TESAEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:133