This class defines a an Abstract class to calculates a weight for a GPM. More...
#include <GPMWeightsAbstractStrategy.h>
Public Member Functions | |
GPMWeightsAbstractStrategy () | |
Default constructor. More... | |
virtual | ~GPMWeightsAbstractStrategy () |
Virtual destructor. More... | |
Protected Attributes | |
GeneralizedProximityMatrix * | m_gpm |
GPM Pointer. More... | |
GPMWeightsStrategyType | m_type |
Weight Type. More... | |
Methods | |
GPMWeightsStrategyType | getWeightsType () |
virtual void | calculate (GeneralizedProximityMatrix *gpm)=0 |
int | createWeightAttribute (GeneralizedProximityMatrix *gpm) |
Added to the edge a new attribute for weight information and return the attr index. More... | |
bool | getDistanceAttributeIndex (te::graph::GraphMetadata *gm, int &index) |
Function used to get the distance attribute index. More... | |
double | getDistanceAttributeValue (te::graph::Edge *e, const int index) |
Function used to get the distance value from a edge element. More... | |
This class defines a an Abstract class to calculates a weight for a GPM.
Definition at line 58 of file GPMWeightsAbstractStrategy.h.
te::sa::GPMWeightsAbstractStrategy::GPMWeightsAbstractStrategy | ( | ) |
Default constructor.
Definition at line 38 of file GPMWeightsAbstractStrategy.cpp.
|
virtual |
Virtual destructor.
Definition at line 42 of file GPMWeightsAbstractStrategy.cpp.
|
pure virtual |
|
protected |
Added to the edge a new attribute for weight information and return the attr index.
Definition at line 51 of file GPMWeightsAbstractStrategy.cpp.
References te::graph::AbstractGraph::addEdgeProperty(), te::dt::DOUBLE_TYPE, te::graph::AbstractGraph::getEdgePropertySize(), te::sa::GeneralizedProximityMatrix::getGraph(), te::dt::Property::setId(), te::dt::Property::setParent(), and TE_SA_WEIGHT_ATTR_NAME.
|
protected |
Function used to get the distance attribute index.
Definition at line 67 of file GPMWeightsAbstractStrategy.cpp.
References te::graph::GraphMetadata::getEdgeProperty(), te::graph::GraphMetadata::getEdgePropertySize(), te::dt::Property::getName(), and TE_SA_DISTANCE_ATTR_NAME.
|
protected |
Function used to get the distance value from a edge element.
Definition at line 81 of file GPMWeightsAbstractStrategy.cpp.
References te::graph::Edge::getAttributes(), and te::dt::SimpleData< T, typeCode >::getValue().
te::sa::GPMWeightsStrategyType te::sa::GPMWeightsAbstractStrategy::getWeightsType | ( | ) |
Definition at line 46 of file GPMWeightsAbstractStrategy.cpp.
|
protected |
GPM Pointer.
Definition at line 97 of file GPMWeightsAbstractStrategy.h.
|
protected |
Weight Type.
Definition at line 95 of file GPMWeightsAbstractStrategy.h.
Referenced by te::sa::GPMWeightsInverseDistanceStrategy::GPMWeightsInverseDistanceStrategy(), te::sa::GPMWeightsNoWeightsStrategy::GPMWeightsNoWeightsStrategy(), and te::sa::GPMWeightsSquaredInverseDistanceStrategy::GPMWeightsSquaredInverseDistanceStrategy().