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