|
using | traits_t = ImmutableEdgecutFragmentTraits< OID_T, VID_T, VDATA_T, EDATA_T > |
|
using | base_t = CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, traits_t > |
|
using | internal_vertex_t = internal::Vertex< VID_T, VDATA_T > |
|
using | edge_t = Edge< VID_T, EDATA_T > |
|
using | nbr_t = Nbr< VID_T, EDATA_T > |
|
using | vertex_t = Vertex< VID_T > |
|
using | vid_t = VID_T |
|
using | oid_t = OID_T |
|
using | vdata_t = VDATA_T |
|
using | edata_t = EDATA_T |
|
using | IsEdgeCut = std::true_type |
|
using | IsVertexCut = std::false_type |
|
using | vertex_range_t = VertexRange< VID_T > |
|
using | inner_vertices_t = typename traits_t::inner_vertices_t |
|
using | outer_vertices_t = typename traits_t::outer_vertices_t |
|
using | vertices_t = typename traits_t::vertices_t |
|
template<typename T > |
using | inner_vertex_array_t = VertexArray< inner_vertices_t, T > |
|
template<typename T > |
using | outer_vertex_array_t = VertexArray< outer_vertices_t, T > |
|
template<typename T > |
using | vertex_array_t = VertexArray< vertices_t, T > |
|
using | adj_list_t = typename base_t::adj_list_t |
|
using | const_adj_list_t = typename base_t::const_adj_list_t |
|
using | nbr_t = Nbr< VID_T, EDATA_T > |
|
using | vertex_t = Vertex< VID_T > |
|
using | const_adj_list_t = ConstAdjList< VID_T, EDATA_T > |
|
using | adj_list_t = AdjList< VID_T, EDATA_T > |
|
using | base_t = EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, ImmutableEdgecutFragmentTraits< OID_T, VID_T, VDATA_T, EDATA_T > > |
|
using | base_t = FragmentBase< OID_T, VDATA_T, EDATA_T > |
|
using | vid_t = VID_T |
|
using | vertex_t = Vertex< VID_T > |
|
using | fragment_adj_list_t = typename TRAITS_T::fragment_adj_list_t |
|
using | fragment_const_adj_list_t = typename TRAITS_T::fragment_const_adj_list_t |
|
using | vertices_t = typename TRAITS_T::vertices_t |
|
using | internal_id_t = typename InternalOID< OID_T >::type |
|
using | inner_vertices_t = typename TRAITS_T::inner_vertices_t |
|
using | outer_vertices_t = typename TRAITS_T::outer_vertices_t |
|
using | sub_vertices_t = typename TRAITS_T::sub_vertices_t |
|
using | mirror_vertices_t = typename TRAITS_T::mirror_vertices_t |
|
|
void | Init (const CommSpec &comm_spec, bool directed, std::unique_ptr< VertexMap< OID_T, VID_T >> &&vm_ptr, std::vector< internal_vertex_t > &vertices, std::vector< edge_t > &edges) |
|
void | ParallelInit (const CommSpec &comm_spec, bool directed, std::unique_ptr< VertexMap< OID_T, VID_T >> &&vm_ptr, std::vector< internal_vertex_t > &vertices, std::vector< edge_t > &edges, int concurrency) |
|
template<typename IOADAPTOR_T > |
void | Serialize (const std::string &prefix) |
|
template<typename IOADAPTOR_T > |
void | Deserialize (const CommSpec &comm_spec, std::unique_ptr< VertexMap< OID_T, VID_T >> &&vm_ptr, const std::string &prefix) |
|
void | PrepareToRunApp (const CommSpec &comm_spec, PrepareConf conf, const ParallelEngineSpec &pe_spec) override |
| For some kind of applications, specific data structures will be generated. More...
|
|
const VDATA_T & | GetData (const vertex_t &v) const override |
| Get the data of a vertex. More...
|
|
void | SetData (const vertex_t &v, const VDATA_T &val) override |
| Set the data of a vertex. More...
|
|
bool | OuterVertexGid2Lid (VID_T gid, VID_T &lid) const override |
|
VID_T | GetOuterVertexGid (vertex_t v) const override |
| Convert from inner vertex handle to its global id. More...
|
|
adj_list_t | GetIncomingInnerVertexAdjList (const vertex_t &v) override |
| Returns the incoming adjacent inner vertices of v. More...
|
|
const_adj_list_t | GetIncomingInnerVertexAdjList (const vertex_t &v) const override |
| Returns the incoming adjacent inner vertices of v. More...
|
|
adj_list_t | GetIncomingOuterVertexAdjList (const vertex_t &v) override |
| Returns the incoming adjacent outer vertices of v. More...
|
|
const_adj_list_t | GetIncomingOuterVertexAdjList (const vertex_t &v) const override |
| Returns the incoming adjacent outer vertices of v. More...
|
|
adj_list_t | GetOutgoingInnerVertexAdjList (const vertex_t &v) override |
| Returns the outgoing adjacent inner vertices of v. More...
|
|
const_adj_list_t | GetOutgoingInnerVertexAdjList (const vertex_t &v) const override |
| Returns the outgoing adjacent inner vertices of v. More...
|
|
adj_list_t | GetOutgoingOuterVertexAdjList (const vertex_t &v) override |
| Returns the outgoing adjacent outer vertices of v. More...
|
|
const_adj_list_t | GetOutgoingOuterVertexAdjList (const vertex_t &v) const override |
| Returns the outgoing adjacent outer vertices of v. More...
|
|
adj_list_t | GetIncomingAdjList (const vertex_t &v, fid_t src_fid) override |
|
const_adj_list_t | GetIncomingAdjList (const vertex_t &v, fid_t src_fid) const override |
|
adj_list_t | GetOutgoingAdjList (const vertex_t &v, fid_t dst_fid) override |
|
const_adj_list_t | GetOutgoingAdjList (const vertex_t &v, fid_t dst_fid) const override |
|
void | init (fid_t fid, fid_t fnum, bool directed) |
|
size_t | GetEdgeNum () const override |
| Returns the number of edges in this fragment. More...
|
|
size_t | GetOutgoingEdgeNum () const |
|
size_t | GetIncomingEdgeNum () const |
|
bool | HasChild (const vertex_t &v) const override |
| Check if vertex v has a child, that is, existing an edge v->u. More...
|
|
bool | HasParent (const vertex_t &v) const override |
| Check if vertex v has a parent, that is, existing an edge u->v. More...
|
|
int | GetLocalOutDegree (const vertex_t &v) const override |
| Returns the out-degree of vertex v in this fragment.<Paste> More...
|
|
int | GetLocalInDegree (const vertex_t &v) const override |
| Returns the in-degree of vertex v in this fragment. More...
|
|
adj_list_t | GetIncomingAdjList (const vertex_t &v) override |
| Returns the incoming adjacent vertices of v. More...
|
|
const_adj_list_t | GetIncomingAdjList (const vertex_t &v) const override |
| Returns the incoming adjacent vertices of v. More...
|
|
virtual AdjList< VID_T, EDATA_T > | GetIncomingAdjList (const Vertex< VID_T > &v)=0 |
| Returns the incoming adjacent vertices of v. More...
|
|
virtual ConstAdjList< VID_T, EDATA_T > | GetIncomingAdjList (const Vertex< VID_T > &v) const =0 |
|
virtual fragment_adj_list_t | GetIncomingAdjList (const Vertex< VID_T > &v, fid_t fid)=0 |
|
virtual fragment_const_adj_list_t | GetIncomingAdjList (const Vertex< VID_T > &v, fid_t fid) const =0 |
|
adj_list_t | GetOutgoingAdjList (const vertex_t &v) override |
| Returns the outgoing adjacent vertices of v. More...
|
|
const_adj_list_t | GetOutgoingAdjList (const vertex_t &v) const override |
| Returns the outgoing adjacent vertices of v. More...
|
|
virtual AdjList< VID_T, EDATA_T > | GetOutgoingAdjList (const Vertex< VID_T > &v)=0 |
| Returns the outgoing adjacent vertices of v. More...
|
|
virtual ConstAdjList< VID_T, EDATA_T > | GetOutgoingAdjList (const Vertex< VID_T > &v) const =0 |
|
virtual fragment_adj_list_t | GetOutgoingAdjList (const Vertex< VID_T > &v, fid_t fid)=0 |
|
virtual fragment_const_adj_list_t | GetOutgoingAdjList (const Vertex< VID_T > &v, fid_t fid) const =0 |
|
bool | IsIncomingBorderVertex (const vertex_t &v) const |
| Check if inner vertex v is an incoming border vertex, that is, existing edge u->v, u is an outer vertex. More...
|
|
bool | IsOutgoingBorderVertex (const vertex_t &v) const |
| Check if inner vertex v is an outgoing border vertex, that is, existing edge v->u, u is an outer vertex. More...
|
|
bool | IsBorderVertex (const vertex_t &v) const |
| Check if inner vertex v is an border vertex, that is, existing edge v->u or u->v, u is an outer vertex. More...
|
|
DestList | IEDests (const vertex_t &v) const override |
| Return the incoming edge destination fragment ID list of a inner vertex. More...
|
|
size_t | IEDestsSize () const override |
|
DestList | OEDests (const vertex_t &v) const override |
| Return the outgoing edge destination fragment ID list of a Vertex. More...
|
|
size_t | OEDestsSize () const override |
|
DestList | IOEDests (const vertex_t &v) const override |
| Return the edge destination fragment ID list of a inner vertex. More...
|
|
size_t | IOEDestsSize () const override |
|
void | PrepareToRunApp (const CommSpec &comm_spec, PrepareConf conf, const ParallelEngineSpec &pe_spec) override |
| For some kind of applications, specific data structures will be generated. More...
|
|
bool | IsInnerVertex (const Vertex< VID_T > &v) const |
| Check if vertex v is inner vertex of this fragment. More...
|
|
bool | IsOuterVertex (const Vertex< VID_T > &v) const |
| Check if vertex v is outer vertex of this fragment. More...
|
|
fid_t | GetFragId (const Vertex< VID_T > &u) const |
| Get the ID of fragment the input vertex belongs to. More...
|
|
VID_T | GetInnerVerticesNum () const |
| Returns the number of inner vertices in this fragment. More...
|
|
void | initMirrorInfo (const CommSpec &comm_spec) |
|
const vertices_t & | Vertices () const |
| Get all vertices referenced to this fragment. More...
|
|
VertexMap< OID_T, VID_T > & | GetVertexMap () |
|
const VertexMap< OID_T, VID_T > & | GetVertexMap () const |
|
const vertices_t & | Vertices () const |
| Get all vertices referenced to this fragment. More...
|
|
size_t | GetVerticesNum () const override |
| Returns the number of vertices in this fragment. More...
|
|
size_t | GetTotalVerticesNum () const override |
| Returns the number of vertices in the entire graph. More...
|
|
bool | GetVertex (const OID_T &oid, Vertex< VID_T > &v) const |
| Get a vertex with original ID vid. More...
|
|
OID_T | GetId (const Vertex< VID_T > &v) const |
| Get the original ID of a vertex. More...
|
|
internal_id_t | GetInternalId (const Vertex< VID_T > &v) const |
|
OID_T | Gid2Oid (VID_T gid) const |
|
fid_t | GetFragId (const Vertex< VID_T > &u) const |
| Get the ID of fragment the input vertex belongs to. More...
|
|
VID_T | GetInnerVerticesNum () const |
| Returns the number of inner vertices in this fragment. More...
|
|
VID_T | GetOuterVerticesNum () const |
| Returns the number of outer vertices in this fragment. More...
|
|
const inner_vertices_t & | InnerVertices () const |
| Returns the vertex range of inner vertices in this fragment. More...
|
|
const outer_vertices_t & | OuterVertices () const |
| Returns the vertex range of outer vertices in this fragment. More...
|
|
const sub_vertices_t & | OuterVertices (fid_t fid) const |
|
const mirror_vertices_t & | MirrorVertices (fid_t fid) const |
|
bool | IsInnerVertex (const Vertex< VID_T > &v) const |
| Check if vertex v is inner vertex of this fragment. More...
|
|
bool | IsOuterVertex (const Vertex< VID_T > &v) const |
| Check if vertex v is outer vertex of this fragment. More...
|
|
bool | GetInnerVertex (const OID_T &oid, Vertex< VID_T > &v) const |
| Get a inner vertex with original ID vid. More...
|
|
OID_T | GetInnerVertexId (vertex_t v) const |
| Get the original ID of an inner vertex. More...
|
|
OID_T | GetOuterVertexId (vertex_t v) const |
| Get the original ID of an outer vertex. More...
|
|
bool | InnerVertexGid2Vertex (VID_T gid, Vertex< VID_T > &v) const |
| Convert from global id to an inner vertex handle. More...
|
|
bool | OuterVertexGid2Vertex (VID_T gid, Vertex< VID_T > &v) const |
| Convert from global id to an outer vertex handle. More...
|
|
VID_T | GetInnerVertexGid (vertex_t v) const |
| Convert from outer vertex handle to its global id. More...
|
|
bool | Gid2Vertex (const vid_t &gid, vertex_t &v) const |
| Convert from global id to a vertex handle. More...
|
|
vid_t | Vertex2Gid (const vertex_t &v) const |
| Convert from vertex handle to its global id. More...
|
|
fid_t | fid () const |
| Returns the ID of this fragment. More...
|
|
fid_t | fnum () const |
| Returns the number of fragments. More...
|
|
bool | directed () const |
| Returns true if the fragment is directed, false otherwise. More...
|
|
fid_t | fid () const |
| Returns the ID of this fragment. More...
|
|
fid_t | fnum () const |
| Returns the number of fragments. More...
|
|
|
void | initOuterVerticesOfFragment () |
|
void | splitEdges () |
|
void | splitEdgesByFragment () |
|
void | buildCSR (const vertices_t &vertex_range, std::vector< Edge< VID_T, EDATA_T >> &edges, LoadStrategy load_strategy, int concurrency=1) |
|
void | serialize (std::unique_ptr< IOADAPTOR_T > &writer) |
|
void | deserialize (std::unique_ptr< IOADAPTOR_T > &reader) |
|
nbr_t * | get_ie_begin (const vertex_t &v) |
|
const nbr_t * | get_ie_begin (const vertex_t &v) const |
|
nbr_t * | get_ie_end (const vertex_t &v) |
|
const nbr_t * | get_ie_end (const vertex_t &v) const |
|
nbr_t * | get_oe_begin (const vertex_t &v) |
|
const nbr_t * | get_oe_begin (const vertex_t &v) const |
|
nbr_t * | get_oe_end (const vertex_t &v) |
|
const nbr_t * | get_oe_end (const vertex_t &v) const |
|
bool | Gid2Lid (VID_T gid, VID_T &lid) const |
|
bool | InnerVertexGid2Lid (VID_T gid, VID_T &lid) const |
|
bool | IsInnerVertexGid (VID_T gid) const |
|
bool | IsInnerVertexLid (VID_T lid) const |
|
virtual bool | OuterVertexGid2Lid (VID_T gid, VID_T &lid) const =0 |
|
void | init (fid_t fid, bool directed, std::unique_ptr< VertexMap< OID_T, VID_T >> &&vm_ptr) |
|
bool | IsInnerVertexGid (VID_T gid) const |
|
bool | IsInnerVertexLid (VID_T lid) const |
|
bool | Gid2Lid (VID_T gid, VID_T &lid) const |
|
bool | InnerVertexGid2Lid (VID_T gid, VID_T &lid) const |
|
void | initMirrorInfo (const CommSpec &comm_spec) |
|
template<typename IOADAPTOR_T > |
void | serialize (std::unique_ptr< IOADAPTOR_T > &writer) |
|
template<typename IOADAPTOR_T > |
void | deserialize (std::unique_ptr< IOADAPTOR_T > &reader) |
|
void | init (fid_t fid, fid_t fnum, bool directed) |
|
template<typename IOADAPTOR_T > |
void | serialize (std::unique_ptr< IOADAPTOR_T > &writer) |
|
template<typename IOADAPTOR_T > |
void | deserialize (std::unique_ptr< IOADAPTOR_T > &reader) |
|
template<typename OID_T, typename VID_T, typename VDATA_T, typename EDATA_T, LoadStrategy _load_strategy = LoadStrategy::kOnlyOut>
class grape::ImmutableEdgecutFragment< OID_T, VID_T, VDATA_T, EDATA_T, _load_strategy >
A kind of edgecut fragment.
- Template Parameters
-
OID_T | Type of original ID. |
VID_T | Type of global ID and local ID. |
VDATA_T | Type of data on vertices. |
EDATA_T | Type of data on edges. |
LoadStrategy | The strategy to store adjacency information, default is only_out. |
With an edgecut partition, each vertex is assigned to a fragment. In a fragment, inner vertices are those vertices assigned to it, and the outer vertices are the remaining vertices adjacent to some of the inner vertices. The load strategy defines how to store the adjacency between inner and outer vertices.
For example, a graph G = {V, E} V = {v0, v1, v2, v3, v4} E = {(v0, v2), (v0, v3), (v1, v0), (v3, v1), (v3, v4), (v4, v1), (v4, v2)}
Subset V_0 = {v0, v1} is assigned to fragment_0, so InnerVertices_0 = {v0, v1}
If the load strategy is kOnlyIn: All incoming edges (along with the source vertices) of inner vertices will be stored in a fragment. So, OuterVertices_0 = {v3, v4}, E_0 = {(v1, v0), (v3, v1), (v4, v1)}
If the load strategy is kOnlyOut: All outgoing edges (along with the destination vertices) of inner vertices will be stored in a fragment. So, OuterVertices_0 = {v2, v3}, E_0 = {(v0, v2), (v0, v3), (v1, v0)}
If the load strategy is kBothOutIn: All incoming edges (along with the source vertices) and outgoing edges (along with destination vertices) of inner vertices will be stored in a fragment. So, OuterVertices_0 = {v2, v3, v4}, E_0 = {(v0, v2), (v0, v3), (v1, v0), (v3, v1), (v4, v1), (v4, v2)}
Inner vertices and outer vertices of a fragment will be given a local ID {0, 1, ..., ivnum - 1, ivnum, ..., ivnum + ovnum - 1}, then iterate on vertices can be implemented to increment the local ID. Also, the sets of inner vertices, outer vertices and all vertices are ranges of local ID.