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::AbstractGraph * | m_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... | |
Class that represents the skater partition operation.
Definition at line 80 of file SkaterPartition.h.
te::sa::SkaterPartition::SkaterPartition | ( | te::graph::AbstractGraph * | graph, |
std::vector< std::string > | attrs | ||
) |
Default constructor.
graph | Pointer to a graph that represents a minimum spanning tree. |
attrs | Vector with attributes names used to calculate the skater operation |
Definition at line 39 of file SkaterPartition.cpp.
te::sa::SkaterPartition::~SkaterPartition | ( | ) |
Virtual destructor.
Definition at line 46 of file SkaterPartition.cpp.
|
protected |
Definition at line 480 of file SkaterPartition.cpp.
References te::graph::Vertex::getAttributes(), te::sa::GetDataValue(), and te::sa::GetGraphVertexAttrIndex().
|
protected |
Definition at line 330 of file SkaterPartition.cpp.
|
protected |
Definition at line 425 of file SkaterPartition.cpp.
References te::graph::Vertex::getId(), te::graph::Edge::getIdFrom(), te::graph::Edge::getIdTo(), and te::graph::Vertex::getNeighborhood().
|
protected |
Definition at line 344 of file SkaterPartition.cpp.
References te::graph::Vertex::getAttributes(), te::sa::GetDataValue(), te::sa::GetGraphVertexAttrIndex(), te::graph::Vertex::getId(), te::graph::Edge::getIdFrom(), te::graph::Edge::getIdTo(), and te::graph::Vertex::getNeighborhood().
|
protected |
Definition at line 209 of file SkaterPartition.cpp.
References te::graph::Edge::getId(), te::graph::Vertex::getId(), te::graph::Edge::getIdFrom(), te::graph::Edge::getIdTo(), te::graph::Vertex::getNeighborhood(), te::sa::EdgeRemovalInfo::m_edgeId, te::sa::EdgeRemovalInfo::m_l, te::sa::EdgeRemovalInfo::m_popa, te::sa::EdgeRemovalInfo::m_popb, te::sa::EdgeRemovalInfo::m_SSDi, te::sa::EdgeRemovalInfo::m_SSDT, te::sa::EdgeRemovalInfo::m_SSDTa, and te::sa::EdgeRemovalInfo::m_SSDTb.
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.
nGroups | Number of cluster to be created. |
Definition at line 51 of file SkaterPartition.cpp.
References te::graph::Edge::getIdFrom(), and te::graph::Edge::getIdTo().
Referenced by te::sa::SkaterOperation::execute().
std::vector< std::size_t > te::sa::SkaterPartition::execute | ( | std::string | popAttr, |
std::size_t | minPop | ||
) |
Definition at line 130 of file SkaterPartition.cpp.
References te::graph::Edge::getIdFrom(), and te::graph::Edge::getIdTo().
|
protected |
Vector with attributes names used to calculate the skater operation.
Definition at line 124 of file SkaterPartition.h.
Referenced by SkaterPartition().
|
protected |
Pointer to a graph that represents a minimum spanning tree.
Definition at line 122 of file SkaterPartition.h.
Referenced by SkaterPartition().
|
protected |
The population attribute name.
Definition at line 126 of file SkaterPartition.h.
|
protected |
The minimum population value allowed in a cluster.
Definition at line 128 of file SkaterPartition.h.
|
protected |
Vector with the sum square differences for each edge removed.
Definition at line 130 of file SkaterPartition.h.