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