This class defines a class to calculates a weight for a GPM using No Weights strategy. More...
#include <GPMWeightsNoWeightsStrategy.h>
Public Member Functions | |
GPMWeightsNoWeightsStrategy (bool normalize) | |
Default constructor. More... | |
virtual | ~GPMWeightsNoWeightsStrategy () |
Virtual destructor. More... | |
Methods | |
Methods used by the GPM constructor | |
virtual void | calculate (GeneralizedProximityMatrix *gpm) |
Protected Attributes | |
GeneralizedProximityMatrix * | m_gpm |
GPM Pointer. More... | |
bool | m_normalize |
GPMWeightsStrategyType | m_type |
Weight Type. More... | |
Methods | |
GPMWeightsStrategyType | getWeightsType () |
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 class to calculates a weight for a GPM using No Weights strategy.
The no weight strategy of proximity matrix (i.e., all weights are 1, only indicating that a connection exists).
Definition at line 55 of file GPMWeightsNoWeightsStrategy.h.
te::sa::GPMWeightsNoWeightsStrategy::GPMWeightsNoWeightsStrategy | ( | bool | normalize | ) |
Default constructor.
Definition at line 36 of file GPMWeightsNoWeightsStrategy.cpp.
References te::sa::GPMWeightsAbstractStrategy::m_type, and te::sa::NoWeightStrategy.
|
virtual |
Virtual destructor.
Definition at line 42 of file GPMWeightsNoWeightsStrategy.cpp.
|
virtual |
Implements te::sa::GPMWeightsAbstractStrategy.
Definition at line 46 of file GPMWeightsNoWeightsStrategy.cpp.
References te::graph::Edge::addAttribute(), te::graph::AbstractGraph::getEdge(), te::graph::GraphMetadata::getEdgePropertySize(), te::graph::MemoryIterator::getFirstVertex(), te::sa::GeneralizedProximityMatrix::getGraph(), te::graph::AbstractGraph::getMetadata(), te::graph::MemoryIterator::getNextVertex(), te::graph::Vertex::getSuccessors(), and te::graph::Edge::setAttributeVecSize().
|
protectedinherited |
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.
|
protectedinherited |
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.
|
protectedinherited |
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().
|
inherited |
Definition at line 46 of file GPMWeightsAbstractStrategy.cpp.
|
protectedinherited |
GPM Pointer.
Definition at line 97 of file GPMWeightsAbstractStrategy.h.
|
protected |
Definition at line 79 of file GPMWeightsNoWeightsStrategy.h.
|
protectedinherited |
Weight Type.
Definition at line 95 of file GPMWeightsAbstractStrategy.h.
Referenced by te::sa::GPMWeightsInverseDistanceStrategy::GPMWeightsInverseDistanceStrategy(), GPMWeightsNoWeightsStrategy(), and te::sa::GPMWeightsSquaredInverseDistanceStrategy::GPMWeightsSquaredInverseDistanceStrategy().