te::sa::SkaterPartition Class Reference

Class that represents the skater partition operation. More...

#include <SkaterPartition.h>

Public Member Functions

std::vector< std::size_t > execute (std::size_t nGroups, std::string popAttr="", std::size_t minPop=0)
 Function to execute the skater partition. More...
 
std::vector< std::size_t > execute (std::string popAttr, std::size_t minPop)
 
 SkaterPartition (te::graph::AbstractGraph *graph, std::vector< std::string > attrs)
 Default constructor. More...
 
 ~SkaterPartition ()
 Virtual destructor. More...
 

Protected Member Functions

double calculateDistance (te::graph::Vertex *vertex, std::vector< double > &meanVec)
 
double calculateEdgeDifference (int vertexFrom, int vertexTo, double &diffA, double &diffB, std::size_t &popA, std::size_t &popB)
 
double calculateRootDeviation (int startVertex, int vertexToIgnore, std::vector< double > &meanVec)
 
std::vector< double > calculateRootMean (int startVertex, int vertexToIgnore, std::size_t &pop)
 
bool edgeToRemove (int startVertex, double &diffA, double &diffB, std::size_t &edgeToRemoveId)
 

Protected Attributes

std::vector< std::string > m_attrs
 Vector with attributes names used to calculate the skater operation. More...
 
te::graph::AbstractGraphm_graph
 Pointer to a graph that represents a minimum spanning tree. More...
 
std::string m_popAttr
 The population attribute name. More...
 
std::size_t m_popMin
 The minimum population value allowed in a cluster. More...
 
std::vector< double > m_SSDiValues
 Vector with the sum square differences for each edge removed. More...
 

Detailed Description

Class that represents the skater partition operation.

Definition at line 89 of file SkaterPartition.h.

Constructor & Destructor Documentation

te::sa::SkaterPartition::SkaterPartition ( te::graph::AbstractGraph graph,
std::vector< std::string >  attrs 
)

Default constructor.

Parameters
graphPointer to a graph that represents a minimum spanning tree.
attrsVector with attributes names used to calculate the skater operation
te::sa::SkaterPartition::~SkaterPartition ( )

Virtual destructor.

Member Function Documentation

double te::sa::SkaterPartition::calculateDistance ( te::graph::Vertex vertex,
std::vector< double > &  meanVec 
)
protected
double te::sa::SkaterPartition::calculateEdgeDifference ( int  vertexFrom,
int  vertexTo,
double &  diffA,
double &  diffB,
std::size_t &  popA,
std::size_t &  popB 
)
protected
double te::sa::SkaterPartition::calculateRootDeviation ( int  startVertex,
int  vertexToIgnore,
std::vector< double > &  meanVec 
)
protected
std::vector<double> te::sa::SkaterPartition::calculateRootMean ( int  startVertex,
int  vertexToIgnore,
std::size_t &  pop 
)
protected
bool te::sa::SkaterPartition::edgeToRemove ( int  startVertex,
double &  diffA,
double &  diffB,
std::size_t &  edgeToRemoveId 
)
protected
std::vector<std::size_t> te::sa::SkaterPartition::execute ( std::size_t  nGroups,
std::string  popAttr = "",
std::size_t  minPop = 0 
)

Function to execute the skater partition.

Parameters
nGroupsNumber of cluster to be created.
Returns
Return a vector with the root vertex id for each cluster created.
std::vector<std::size_t> te::sa::SkaterPartition::execute ( std::string  popAttr,
std::size_t  minPop 
)

Member Data Documentation

std::vector<std::string> te::sa::SkaterPartition::m_attrs
protected

Vector with attributes names used to calculate the skater operation.

Definition at line 133 of file SkaterPartition.h.

te::graph::AbstractGraph* te::sa::SkaterPartition::m_graph
protected

Pointer to a graph that represents a minimum spanning tree.

Definition at line 131 of file SkaterPartition.h.

std::string te::sa::SkaterPartition::m_popAttr
protected

The population attribute name.

Definition at line 135 of file SkaterPartition.h.

std::size_t te::sa::SkaterPartition::m_popMin
protected

The minimum population value allowed in a cluster.

Definition at line 137 of file SkaterPartition.h.

std::vector<double> te::sa::SkaterPartition::m_SSDiValues
protected

Vector with the sum square differences for each edge removed.

Definition at line 139 of file SkaterPartition.h.


The documentation for this class was generated from the following file: