27 #include "../../datatype/SimpleData.h" 28 #include "../../graph/core/AbstractGraph.h" 29 #include "../../graph/core/Edge.h" 30 #include "../../graph/core/GraphMetadata.h" 31 #include "../../graph/core/Vertex.h" 32 #include "../../graph/iterator/MemoryIterator.h" 37 : m_normalize(normalize)
61 std::set<int>::iterator itNeighbours = neighbours.begin();
67 weight = 1./ neighbours.size();
69 while(itNeighbours != neighbours.end())
virtual te::graph::Vertex * getFirstVertex()
It returns a pointer to the first vertex element of a graph.
This class defines a class to calculates a weight for a GPM using No Weights strategy.
void setAttributeVecSize(int size)
This function is used to set the number of attributes associated with the edge elements.
virtual te::graph::Vertex * getNextVertex()
It returns a pointer to the next vertex element of a graph.
This class defines a Generalized Proximity Matrix.
virtual te::graph::Edge * getEdge(int id)=0
It returns the edge element if it's exist.
GPMWeightsStrategyType m_type
Weight Type.
From the point of view of graph theory, vertices are treated as featureless and indivisible objects...
virtual te::graph::GraphMetadata * getMetadata()=0
Function used to access the graph metadata.
int createWeightAttribute(GeneralizedProximityMatrix *gpm)
Added to the edge a new attribute for weight information and return the attr index.
Class used to define the edge struct of a graph. Its compose with a identifier, the vertex origin and...
GPMWeightsNoWeightsStrategy(bool normalize)
Default constructor.
Abstract class used to define the main functions of graph struct. All graph implementations must used...
std::set< int > & getSuccessors()
Returns the Successors vector.
virtual ~GPMWeightsNoWeightsStrategy()
Virtual destructor.
virtual void calculate(GeneralizedProximityMatrix *gpm)
A template for atomic data types (integers, floats, strings and others).
void addAttribute(int idx, te::dt::AbstractData *ad)
Add a new attribute to this element.
te::graph::AbstractGraph * getGraph()
This class defines the GPM class.