Exemple #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];
 }
Exemple #2
0
 size_t num_edges() {
     return graph->EdgeCount();
 }
Exemple #3
0
 size_t num_vertices() {
     return graph->VertexCount();
 }
Exemple #4
0
 void save() const {
     graph->Sync();
 }
Exemple #5
0
 size_t num_out_edges(const vertex_id_type vid) const {
     auto ei = graph->Vertices();
     ei->MoveTo(vid);
     return ei->OutEdgeCount();
 }
Exemple #6
0
 ~sae_graph() {
     graph->Close();
     delete graph;
     delete [] v_valid_;
 }
Exemple #7
0
 size_t num_in_edges(const vertex_id_type vid) const {
     auto ei = graph->Vertices();
     ei->MoveTo(vid);
     return ei->InEdges()->Count();
 }
Exemple #8
0
 ~sae_graph() {
     graph->Close();
     delete graph;
 }
Exemple #9
0
 vertex_type vertex(vertex_id_type vid){
     sae::io::VertexIteratorPtr v = graph->Vertices();
     v->MoveTo(vid);
     return vertex_type(std::move(v));
 }