29 #include "../../common/STLUtils.h"
30 #include "../core/Edge.h"
31 #include "../core/GraphCache.h"
32 #include "../core/GraphData.h"
33 #include "../core/GraphDataManager.h"
34 #include "../core/GraphMetadata.h"
35 #include "../core/Vertex.h"
36 #include "../graphs/Graph.h"
60 std::vector<te::graph::Vertex*> vec;
78 vNeighbor = getVertex(e->
getIdTo());
87 vec.push_back(vNeighbor);
119 bool hasVFrom =
false;
121 if(!m_metadata->m_memoryGraph)
123 m_graphData = m_graphCache->checkCacheByVertexId(e->
getIdFrom());
139 if(!m_metadata->m_memoryGraph)
141 m_graphData = m_graphCache->checkCacheByVertexId(e->
getIdTo());
155 if(hasVFrom && hasVTo)
213 std::vector<te::graph::Edge*> vec;
virtual void add(Edge *e)
Add a new edge element to a graph.
virtual void removeEdge(int id)
This function removes the edge element from graph, also was removed in data source.
int getId()
It returns the edge identification.
~UndirectedGraph()
Virtual destructor.
From the point of view of graph theory, vertices are treated as featureless and indivisible objects...
virtual bool isIsolateVertex(int id, bool &flag)
This function indicates if a desired element is a isolated vertex.
Class used to define the edge struct of a graph. Its compose with a identifier, the vertex origin and...
This class is used to set the main functions of a cache policy.
This class define the main functions necessary to save and load the graph data and metadata informati...
virtual void add(Vertex *v)
Add a new vertex element to a graph.
int getIdFrom()
It returns the vertex origin identification.
std::set< int > & getNeighborhood()
Returns the Neighborhood vector.
virtual std::vector< te::graph::Vertex * > getVertexNeighborhood(int id)
The neighborhood of a vertex v is an induced subgraph of the graph, formed by all vertices adjacent t...
This is a implementation of a UndirectedGraph Graph. By definition a undirected graph has no directio...
virtual void removeEdge(int id)
This function removes the edge element from graph, also was removed in data source.
This is the main graph implementation, that uses a cache policy anda graph loader to get all elements...
virtual std::vector< te::graph::Edge * > getEdges(int vId)
It returns all edges that belongs to a vertex.
int getIdTo()
It returns the vertex destiny identification.
UndirectedGraph()
constructor.