Esempio n. 1
0
 vertex_type& vertex(vertex_id_type vid){
     if (!v_valid_[vid]) {
         sae::io::VertexIteratorPtr v = graph->Vertices();
         v->MoveTo(vid);
         std::string s = v->Data();
         vertices_[vid] = vertex_type(std::move(v));
         v_valid_[vid] = 1;
     }
     return vertices_[vid];
 }
Esempio n. 2
0
 size_t num_edges() {
     return graph->EdgeCount();
 }
Esempio n. 3
0
 size_t num_vertices() {
     return graph->VertexCount();
 }
Esempio n. 4
0
 void save() const {
     graph->Sync();
 }
Esempio n. 5
0
 size_t num_out_edges(const vertex_id_type vid) const {
     auto ei = graph->Vertices();
     ei->MoveTo(vid);
     return ei->OutEdgeCount();
 }
Esempio n. 6
0
 ~sae_graph() {
     graph->Close();
     delete graph;
     delete [] v_valid_;
 }
Esempio n. 7
0
 size_t num_in_edges(const vertex_id_type vid) const {
     auto ei = graph->Vertices();
     ei->MoveTo(vid);
     return ei->InEdges()->Count();
 }
Esempio n. 8
0
 ~sae_graph() {
     graph->Close();
     delete graph;
 }
Esempio n. 9
0
 vertex_type vertex(vertex_id_type vid){
     sae::io::VertexIteratorPtr v = graph->Vertices();
     v->MoveTo(vid);
     return vertex_type(std::move(v));
 }