@@ -36,13 +36,16 @@ template <typename OID_T, typename VDATA_T, typename EDATA_T>
3636class ImmutableVertexcutFragment {};
3737
3838template <>
39- class ImmutableVertexcutFragment <int64_t , EmptyType, EmptyType>
40- : public FragmentBase<int64_t , EmptyType, EmptyType> {
39+ class ImmutableVertexcutFragment <uint64_t , EmptyType, EmptyType>
40+ : public FragmentBase<uint64_t , EmptyType, EmptyType> {
4141 public:
42- using oid_t = int64_t ;
42+ using oid_t = uint64_t ;
43+ using vid_t = uint64_t ;
4344 using edata_t = EmptyType;
4445 using vdata_t = EmptyType;
46+ using vertex_t = Vertex<vid_t >;
4547 using vertices_t = VertexRange<oid_t >;
48+ using vertex_range_t = VertexRange<vid_t >;
4649 using both_vertices_t = DualVertexRange<oid_t >;
4750 using edge_t = Edge<oid_t , edata_t >;
4851 using base_t = FragmentBase<oid_t , vdata_t , edata_t >;
@@ -74,6 +77,8 @@ class ImmutableVertexcutFragment<int64_t, EmptyType, EmptyType>
7477 using base_t ::fid_;
7578 using base_t ::fnum_;
7679
80+ inline const EmptyType& GetData (const vertex_t & v) const { return data_; }
81+
7782 void Init (const CommSpec& comm_spec, int64_t vnum,
7883 std::vector<edge_t >&& edges, int bucket_num = 1 ,
7984 std::vector<size_t >&& bucket_edge_offsets = {}) {
@@ -146,6 +151,7 @@ class ImmutableVertexcutFragment<int64_t, EmptyType, EmptyType>
146151 const vertices_t & DestinationVertices () const { return dst_vertices_; }
147152 const both_vertices_t & Vertices () const { return vertices_; }
148153
154+ const vertices_t & InnerVertices () const { return master_vertices_; }
149155 const vertices_t & MasterVertices () const { return master_vertices_; }
150156
151157#ifdef USE_EDGE_ARRAY
@@ -245,6 +251,7 @@ class ImmutableVertexcutFragment<int64_t, EmptyType, EmptyType>
245251 }
246252
247253 int GetBucketNum () const { return bucket_num_; }
254+ oid_t GetId (const Vertex<oid_t >& v) const { return v.GetValue (); }
248255
249256 private:
250257 void buildBucket (int thread_num) {
@@ -334,6 +341,7 @@ class ImmutableVertexcutFragment<int64_t, EmptyType, EmptyType>
334341#endif
335342 int bucket_num_;
336343 std::vector<size_t > bucket_edge_offsets_;
344+ EmptyType data_;
337345};
338346
339347} // namespace grape
0 commit comments