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