29 #include "../../common/STLUtils.h"
30 #include "../core/GraphCache.h"
31 #include "../core/GraphData.h"
32 #include "../core/GraphDataManager.h"
33 #include "../core/GraphMetadata.h"
34 #include "../core/Edge.h"
35 #include "../core/Vertex.h"
63 std::vector<te::graph::Vertex*> vec;
69 std::vector<int> edges;
74 for(
size_t i = 0; i < edges.size(); ++i)
84 vNeighbor = getVertex(e->
getIdTo());
93 vec.push_back(vNeighbor);
167 if(!m_metadata->m_memoryGraph)
169 m_graphData = m_graphCache->checkCacheByVertexId(e->
getIdFrom());
181 if(!m_metadata->m_memoryGraph)
183 m_graphData = m_graphCache->checkCacheByVertexId(e->
getIdTo());
252 std::vector<te::graph::Edge*> vec;
278 std::vector<te::graph::Edge*> vec;
This is a implementation of a Bidirectional Graph. By convention a bidirectional graph provides acces...
virtual bool isSourceVertex(int id, bool &flag)
This function indicates if a desired element is a source vertex.
virtual void removeEdge(int id)
This function removes the edge element from graph, also was removed in data source.
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...
std::set< int > & getPredecessors()
Returns the Predecessors vector.
int getId()
It returns the edge identification.
virtual bool isSinkVertex(int id, bool &flag)
This function indicates if a desired element is a sink vertex.
~BidirectionalGraph()
Virtual destructor.
From the point of view of graph theory, vertices are treated as featureless and indivisible objects...
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.
virtual std::vector< te::graph::Edge * > getOutEdges(int vId)
It returns all edges that came out a vertex.
virtual void removeEdge(int id)
This function removes the edge element from graph, also was removed in data source.
This class define the main functions necessary to save and load the graph data and metadata informati...
std::set< int > & getSuccessors()
Returns the Successors vector.
virtual void add(Vertex *v)
Add a new vertex element to a graph.
int getIdFrom()
It returns the vertex origin identification.
This is the main graph implementation, that uses a cache policy anda graph loader to get all elements...
BidirectionalGraph()
constructor.
virtual std::vector< te::graph::Edge * > getInEdges(int vId)
It returns all edges that came in a vertex.
virtual bool isIsolateVertex(int id, bool &flag)
This function indicates if a desired element is a isolated vertex.
This is the main graph implementation, that uses a cache policy anda graph loader to get all elements...
virtual void add(Edge *e)
Add a new edge element to a graph.
int getIdTo()
It returns the vertex destiny identification.