Class used to execute the skater operations. More...
#include <SkaterOperation.h>
Public Member Functions | |
void | execute () |
Function to execute the skater operation. More... | |
int | getNumberOfClasses () |
void | setParameters (te::sa::SkaterInputParams *inParams, te::sa::SkaterOutputParams *outParams) |
SkaterOperation () | |
Default constructor. More... | |
~SkaterOperation () | |
Virtual destructor. More... | |
Protected Member Functions | |
double | calculateWeight (std::vector< int > attrsIdx, te::graph::Vertex *vFrom, te::graph::Vertex *vTo) |
Function to calculate the weight attribute using the euclidean distance. More... | |
std::auto_ptr< te::mem::DataSet > | createDataSet (te::da::DataSet *inputDataSet, te::da::DataSetType *dsType, std::map< int, int > &skaterMap, std::string linkName) |
std::auto_ptr < te::da::DataSetType > | createDataSetType (te::da::DataSetType *dsType) |
std::map< int, int > | createSkaterMap (te::graph::AbstractGraph *graph, std::vector< std::size_t > &roots) |
void | createWeightAttribute (int weightAttrIdx, std::vector< int > attrsIdx) |
Function to create the weight attribute. More... | |
void | saveDataSet (te::da::DataSet *dataSet, te::da::DataSetType *dsType) |
Protected Attributes | |
std::auto_ptr < te::sa::SkaterInputParams > | m_inputParams |
Attribute with the skater input parameters. More... | |
int | m_nClassGroups |
Number of classes (clusters) generated. More... | |
std::auto_ptr < te::sa::SkaterOutputParams > | m_outputParams |
Attribute with the skater output parameters. More... | |
Class used to execute the skater operations.
Definition at line 55 of file SkaterOperation.h.
te::sa::SkaterOperation::SkaterOperation | ( | ) |
Default constructor.
Definition at line 54 of file SkaterOperation.cpp.
te::sa::SkaterOperation::~SkaterOperation | ( | ) |
Virtual destructor.
Definition at line 58 of file SkaterOperation.cpp.
|
protected |
Function to calculate the weight attribute using the euclidean distance.
Definition at line 238 of file SkaterOperation.cpp.
References te::graph::Vertex::getAttributes(), and te::sa::GetDataValue().
|
protected |
Function used to create the output dataset
Definition at line 167 of file SkaterOperation.cpp.
References te::da::DataSet::getAsString(), te::da::DataSet::getNumProperties(), te::da::DataSet::getValue(), te::da::DataSet::moveBeforeFirst(), te::da::DataSet::moveNext(), te::mem::DataSetItem::setInt32(), te::mem::DataSetItem::setValue(), and TE_SA_SKATER_ATTR_CLASS_NAME.
|
protected |
Function used to create the output dataset type
Definition at line 142 of file SkaterOperation.cpp.
References te::dt::Property::clone(), te::dt::CompositeProperty::getProperties(), te::dt::INT32_TYPE, te::dt::Property::setId(), te::dt::Property::setParent(), and TE_SA_SKATER_ATTR_CLASS_NAME.
|
protected |
Definition at line 253 of file SkaterOperation.cpp.
References te::graph::AbstractGraph::getEdge(), te::graph::Vertex::getId(), te::graph::Edge::getIdFrom(), te::graph::Edge::getIdTo(), te::graph::Vertex::getNeighborhood(), and te::graph::AbstractGraph::getVertex().
|
protected |
Function to create the weight attribute.
Definition at line 211 of file SkaterOperation.cpp.
References te::graph::Edge::addAttribute(), te::graph::GraphMetadata::getEdgePropertySize(), te::graph::MemoryIterator::getFirstEdge(), te::graph::Edge::getIdFrom(), te::graph::Edge::getIdTo(), te::graph::AbstractGraph::getMetadata(), te::graph::MemoryIterator::getNextEdge(), te::graph::AbstractGraph::getVertex(), and te::graph::Edge::setAttributeVecSize().
void te::sa::SkaterOperation::execute | ( | ) |
Function to execute the skater operation.
Definition at line 62 of file SkaterOperation.cpp.
References te::sa::AddGraphEdgeAttribute(), te::sa::AssociateGPMVertexAttribute(), te::sa::Both, te::sa::Clusters, te::dt::DOUBLE_TYPE, te::sa::SkaterPartition::execute(), te::sa::Population, and TE_SA_SKATER_ATTR_WEIGHT_NAME.
Referenced by te::sa::SkaterDialog::onOkPushButtonClicked().
int te::sa::SkaterOperation::getNumberOfClasses | ( | ) |
Definition at line 137 of file SkaterOperation.cpp.
Referenced by te::sa::SkaterDialog::onOkPushButtonClicked().
|
protected |
Function used to save the output dataset
Definition at line 199 of file SkaterOperation.cpp.
References te::da::DataSet::moveBeforeFirst().
void te::sa::SkaterOperation::setParameters | ( | te::sa::SkaterInputParams * | inParams, |
te::sa::SkaterOutputParams * | outParams | ||
) |
Definition at line 131 of file SkaterOperation.cpp.
Referenced by te::sa::SkaterDialog::onOkPushButtonClicked().
|
protected |
Attribute with the skater input parameters.
Definition at line 95 of file SkaterOperation.h.
|
protected |
Number of classes (clusters) generated.
Definition at line 99 of file SkaterOperation.h.
|
protected |
Attribute with the skater output parameters.
Definition at line 97 of file SkaterOperation.h.