All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
te::sa::GPMWeightsInverseDistanceStrategy Class Reference

This class defines a class to calculates a weight for a GPM using Inverse Distance strategy. More...

#include <GPMWeightsInverseDistanceStrategy.h>

Inheritance diagram for te::sa::GPMWeightsInverseDistanceStrategy:
te::sa::GPMWeightsAbstractStrategy

Public Member Functions

 GPMWeightsInverseDistanceStrategy (bool normalize, double a=1.0, double factor=1.0)
 Default constructor. More...
 
virtual ~GPMWeightsInverseDistanceStrategy ()
 Virtual destructor. More...
 
Methods

Methods used by the GPM constructor

virtual void calculate (GeneralizedProximityMatrix *gpm)
 

Protected Attributes

double m_a
 
double m_factor
 
GeneralizedProximityMatrixm_gpm
 GPM Pointer. More...
 
bool m_normalize
 
GPMWeightsStrategyType m_type
 Weight Type. More...
 

Methods

Methods used by the GPM constructor

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...
 

Detailed Description

This class defines a class to calculates a weight for a GPM using Inverse Distance strategy.

Formula: w = (a*1/dist_centroids + b*1/dist_to_net + c*1/dist_net_connection)*factor

These values can be normalized or not.

See also
GPMBuilder

Definition at line 57 of file GPMWeightsInverseDistanceStrategy.h.

Constructor & Destructor Documentation

te::sa::GPMWeightsInverseDistanceStrategy::GPMWeightsInverseDistanceStrategy ( bool  normalize,
double  a = 1.0,
double  factor = 1.0 
)
te::sa::GPMWeightsInverseDistanceStrategy::~GPMWeightsInverseDistanceStrategy ( )
virtual

Virtual destructor.

Definition at line 44 of file GPMWeightsInverseDistanceStrategy.cpp.

Member Function Documentation

int te::sa::GPMWeightsAbstractStrategy::createWeightAttribute ( GeneralizedProximityMatrix gpm)
protectedinherited
bool te::sa::GPMWeightsAbstractStrategy::getDistanceAttributeIndex ( te::graph::GraphMetadata gm,
int &  index 
)
protectedinherited
double te::sa::GPMWeightsAbstractStrategy::getDistanceAttributeValue ( te::graph::Edge e,
const int  index 
)
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().

te::sa::GPMWeightsStrategyType te::sa::GPMWeightsAbstractStrategy::getWeightsType ( )
inherited

Definition at line 46 of file GPMWeightsAbstractStrategy.cpp.

Member Data Documentation

double te::sa::GPMWeightsInverseDistanceStrategy::m_a
protected

Definition at line 83 of file GPMWeightsInverseDistanceStrategy.h.

double te::sa::GPMWeightsInverseDistanceStrategy::m_factor
protected

Definition at line 85 of file GPMWeightsInverseDistanceStrategy.h.

GeneralizedProximityMatrix* te::sa::GPMWeightsAbstractStrategy::m_gpm
protectedinherited

GPM Pointer.

Definition at line 97 of file GPMWeightsAbstractStrategy.h.

bool te::sa::GPMWeightsInverseDistanceStrategy::m_normalize
protected

Definition at line 81 of file GPMWeightsInverseDistanceStrategy.h.


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