@@ -36,13 +36,16 @@ template <typename OID_T, typename VDATA_T, typename EDATA_T>
36
36
class ImmutableVertexcutFragment {};
37
37
38
38
template <>
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> {
41
41
public:
42
- using oid_t = int64_t ;
42
+ using oid_t = uint64_t ;
43
+ using vid_t = uint64_t ;
43
44
using edata_t = EmptyType;
44
45
using vdata_t = EmptyType;
46
+ using vertex_t = Vertex<vid_t >;
45
47
using vertices_t = VertexRange<oid_t >;
48
+ using vertex_range_t = VertexRange<vid_t >;
46
49
using both_vertices_t = DualVertexRange<oid_t >;
47
50
using edge_t = Edge<oid_t , edata_t >;
48
51
using base_t = FragmentBase<oid_t , vdata_t , edata_t >;
@@ -74,6 +77,8 @@ class ImmutableVertexcutFragment<int64_t, EmptyType, EmptyType>
74
77
using base_t ::fid_;
75
78
using base_t ::fnum_;
76
79
80
+ inline const EmptyType& GetData (const vertex_t & v) const { return data_; }
81
+
77
82
void Init (const CommSpec& comm_spec, int64_t vnum,
78
83
std::vector<edge_t >&& edges, int bucket_num = 1 ,
79
84
std::vector<size_t >&& bucket_edge_offsets = {}) {
@@ -146,6 +151,7 @@ class ImmutableVertexcutFragment<int64_t, EmptyType, EmptyType>
146
151
const vertices_t & DestinationVertices () const { return dst_vertices_; }
147
152
const both_vertices_t & Vertices () const { return vertices_; }
148
153
154
+ const vertices_t & InnerVertices () const { return master_vertices_; }
149
155
const vertices_t & MasterVertices () const { return master_vertices_; }
150
156
151
157
#ifdef USE_EDGE_ARRAY
@@ -245,6 +251,7 @@ class ImmutableVertexcutFragment<int64_t, EmptyType, EmptyType>
245
251
}
246
252
247
253
int GetBucketNum () const { return bucket_num_; }
254
+ oid_t GetId (const Vertex<oid_t >& v) const { return v.GetValue (); }
248
255
249
256
private:
250
257
void buildBucket (int thread_num) {
@@ -334,6 +341,7 @@ class ImmutableVertexcutFragment<int64_t, EmptyType, EmptyType>
334
341
#endif
335
342
int bucket_num_;
336
343
std::vector<size_t > bucket_edge_offsets_;
344
+ EmptyType data_;
337
345
};
338
346
339
347
} // namespace grape
0 commit comments