Go to the documentation of this file.
28 #ifndef __TERRALIB_SA_INTERNAL_SKATERPARTITION_H
29 #define __TERRALIB_SA_INTERNAL_SKATERPARTITION_H
33 #include "../Config.h"
113 std::vector<std::size_t>
execute(std::size_t nGroups, std::string popAttr =
"", std::size_t minPop = 0);
115 std::vector<std::size_t>
execute(std::string popAttr, std::size_t minPop);
119 bool edgeToRemove(
int startVertex,
double& diffA,
double& diffB, std::size_t& edgeToRemoveId);
121 double calculateEdgeDifference(
int vertexFrom,
int vertexTo,
double& diffA,
double& diffB, std::size_t& popA, std::size_t& popB);
145 #endif //__TERRALIB_SA_INTERNAL_SKATERPARTITION_H
EdgeRemovalInfo()
Default constructor.
std::size_t m_edgeId
Edge identification.
A struct that represents the skater partition values for each edge.
Class that represents the skater partition operation.
SkaterPartition(te::graph::AbstractGraph *graph, std::vector< std::string > attrs)
Default constructor.
std::size_t m_popa
Sum of population for Tree A.
double calculateRootDeviation(int startVertex, int vertexToIgnore, std::vector< double > &meanVec)
std::vector< double > m_SSDiValues
Vector with the sum square differences for each edge removed.
double m_SSDi
Sum of m_SSDa and m_SSDb.
This file contains a class that represents the skater parameters.
~EdgeRemovalInfo()
Destructor.
From the point of view of graph theory, vertices are treated as featureless and indivisible objects,...
double calculateEdgeDifference(int vertexFrom, int vertexTo, double &diffA, double &diffB, std::size_t &popA, std::size_t &popB)
std::size_t m_popb
Sum of population for Tree B.
double m_SSDT
Sum of Square Difference for Tree.
double calculateDistance(te::graph::Vertex *vertex, std::vector< double > &meanVec)
double m_SSDTb
Sum of Square Difference for Tree B.
bool edgeToRemove(int startVertex, double &diffA, double &diffB, std::size_t &edgeToRemoveId)
#define TESAEXPORT
You can use this macro in order to export/import classes and functions from this module.
double m_SSDTa
Sum of Square Difference for Tree A.
std::string m_popAttr
The population attribute name.
te::graph::AbstractGraph * m_graph
Pointer to a graph that represents a minimum spanning tree.
std::vector< std::size_t > execute(std::size_t nGroups, std::string popAttr="", std::size_t minPop=0)
Function to execute the skater partition.
std::size_t m_popMin
The minimum population value allowed in a cluster.
std::vector< std::size_t > execute(std::string popAttr, std::size_t minPop)
Abstract class used to define the main functions of graph struct. All graph implementations must used...
~SkaterPartition()
Virtual destructor.
std::vector< double > calculateRootMean(int startVertex, int vertexToIgnore, std::size_t &pop)
std::vector< std::string > m_attrs
Vector with attributes names used to calculate the skater operation.
double m_l
Difference between m_SSDT and m_SSDi;.