libgrape-lite
A C++ library for parallel graph processing
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
grape::ImmutableEdgecutFragment< OID_T, VID_T, VDATA_T, EDATA_T, _load_strategy > Class Template Reference

A kind of edgecut fragment. More...

#include <immutable_edgecut_fragment.h>

Inheritance diagram for grape::ImmutableEdgecutFragment< OID_T, VID_T, VDATA_T, EDATA_T, _load_strategy >:
grape::CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, ImmutableEdgecutFragmentTraits< OID_T, VID_T, VDATA_T, EDATA_T > > grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T > grape::FragmentBase< OID_T, VDATA_T, EDATA_T >

Public Types

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
 
- Public Types inherited from grape::CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, ImmutableEdgecutFragmentTraits< OID_T, VID_T, VDATA_T, EDATA_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 > >
 
- Public Types inherited from grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_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
 

Public Member Functions

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)
 
- Public Member Functions inherited from grape::CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, ImmutableEdgecutFragmentTraits< OID_T, VID_T, VDATA_T, EDATA_T > >
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...
 
- Public Member Functions inherited from grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >
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...
 
- Public Member Functions inherited from grape::FragmentBase< OID_T, VDATA_T, EDATA_T >
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...
 

Static Public Member Functions

static std::string type_info ()
 

Static Public Attributes

static constexpr LoadStrategy load_strategy = _load_strategy
 
- Static Public Attributes inherited from grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >
static constexpr FragmentType fragment_type = FragmentType::kEdgeCut
 

Protected Member Functions

void initOuterVerticesOfFragment ()
 
void splitEdges ()
 
void splitEdgesByFragment ()
 
- Protected Member Functions inherited from grape::CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, ImmutableEdgecutFragmentTraits< OID_T, VID_T, VDATA_T, EDATA_T > >
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_tget_ie_begin (const vertex_t &v)
 
const nbr_tget_ie_begin (const vertex_t &v) const
 
nbr_tget_ie_end (const vertex_t &v)
 
const nbr_tget_ie_end (const vertex_t &v) const
 
nbr_tget_oe_begin (const vertex_t &v)
 
const nbr_tget_oe_begin (const vertex_t &v) const
 
nbr_tget_oe_end (const vertex_t &v)
 
const nbr_tget_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
 
- Protected Member Functions inherited from grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >
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)
 
- Protected Member Functions inherited from grape::FragmentBase< OID_T, VDATA_T, EDATA_T >
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)
 

Protected Attributes

VID_T ovnum_
 
ska::flat_hash_map< VID_T, VID_T, std::hash< VID_T >, std::equal_to< VID_T >, Allocator< std::pair< VID_T, VID_T > > > ovg2l_
 
Array< VID_T, Allocator< VID_T > > ovgid_
 
Array< VDATA_T, Allocator< VDATA_T > > vdata_
 
std::vector< VertexArray< inner_vertices_t, nbr_t * > > iespliters_
 
std::vector< VertexArray< inner_vertices_t, nbr_t * > > oespliters_
 
bool splited_edges_by_fragment_ = false
 
bool splited_edges_ = false
 
bool directed_
 
fid_t fid_
 
fid_t fnum_
 
- Protected Attributes inherited from grape::CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, ImmutableEdgecutFragmentTraits< OID_T, VID_T, VDATA_T, EDATA_T > >
csr_t ie_
 
csr_t oe_
 
ImmutableCSR< VID_T, fid_t > idst_
 
ImmutableCSR< VID_T, fid_t > odst_
 
ImmutableCSR< VID_T, fid_t > iodst_
 
bool idst_built_
 
bool odst_built_
 
bool iodst_built_
 
bool mirror_info_initialized_
 
- Protected Attributes inherited from grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >
VID_T ivnum_
 
inner_vertices_t inner_vertices_
 
outer_vertices_t outer_vertices_
 
vertices_t vertices_
 
std::vector< sub_vertices_t > outer_vertices_of_frag_
 
std::vector< mirror_vertices_t > mirrors_of_frag_
 
std::unique_ptr< VertexMap< OID_T, VID_T > > vm_ptr_
 
IdParser< VID_T > id_parser_
 
- Protected Attributes inherited from grape::FragmentBase< OID_T, VDATA_T, EDATA_T >
fid_t fid_
 
fid_t fnum_
 
bool directed_
 

Additional Inherited Members

- Protected Types inherited from grape::CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, ImmutableEdgecutFragmentTraits< OID_T, VID_T, VDATA_T, EDATA_T > >
using vertices_t = typename TRAITS_T::vertices_t
 

Detailed Description

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_TType of original ID.
VID_TType of global ID and local ID.
VDATA_TType of data on vertices.
EDATA_TType of data on edges.
LoadStrategyThe 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.

Member Function Documentation

◆ GetData()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , LoadStrategy _load_strategy = LoadStrategy::kOnlyOut>
const VDATA_T& grape::ImmutableEdgecutFragment< OID_T, VID_T, VDATA_T, EDATA_T, _load_strategy >::GetData ( const vertex_t v) const
inlineoverridevirtual

Get the data of a vertex.

Parameters
vInput vertex.
Returns
Data on it.

Implements grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >.

◆ GetIncomingInnerVertexAdjList() [1/2]

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , LoadStrategy _load_strategy = LoadStrategy::kOnlyOut>
const_adj_list_t grape::ImmutableEdgecutFragment< OID_T, VID_T, VDATA_T, EDATA_T, _load_strategy >::GetIncomingInnerVertexAdjList ( const vertex_t v) const
inlineoverridevirtual

Returns the incoming adjacent inner vertices of v.

Parameters
vInput vertex.
Returns
The incoming adjacent inner vertices of v.

Implements grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >.

◆ GetIncomingInnerVertexAdjList() [2/2]

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , LoadStrategy _load_strategy = LoadStrategy::kOnlyOut>
adj_list_t grape::ImmutableEdgecutFragment< OID_T, VID_T, VDATA_T, EDATA_T, _load_strategy >::GetIncomingInnerVertexAdjList ( const vertex_t v)
inlineoverridevirtual

Returns the incoming adjacent inner vertices of v.

Parameters
vInput vertex.
Returns
The incoming adjacent inner vertices of v.

Implements grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >.

◆ GetIncomingOuterVertexAdjList() [1/2]

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , LoadStrategy _load_strategy = LoadStrategy::kOnlyOut>
const_adj_list_t grape::ImmutableEdgecutFragment< OID_T, VID_T, VDATA_T, EDATA_T, _load_strategy >::GetIncomingOuterVertexAdjList ( const vertex_t v) const
inlineoverridevirtual

Returns the incoming adjacent outer vertices of v.

Parameters
vInput vertex.
Returns
The incoming adjacent outer vertices of v.

Implements grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >.

◆ GetIncomingOuterVertexAdjList() [2/2]

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , LoadStrategy _load_strategy = LoadStrategy::kOnlyOut>
adj_list_t grape::ImmutableEdgecutFragment< OID_T, VID_T, VDATA_T, EDATA_T, _load_strategy >::GetIncomingOuterVertexAdjList ( const vertex_t v)
inlineoverridevirtual

Returns the incoming adjacent outer vertices of v.

Parameters
vInput vertex.
Returns
The incoming adjacent outer vertices of v.

Implements grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >.

◆ GetOuterVertexGid()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , LoadStrategy _load_strategy = LoadStrategy::kOnlyOut>
VID_T grape::ImmutableEdgecutFragment< OID_T, VID_T, VDATA_T, EDATA_T, _load_strategy >::GetOuterVertexGid ( vertex_t  v) const
inlineoverridevirtual

Convert from inner vertex handle to its global id.

Parameters
vInput vertex handle.
Returns
Global id of the vertex.

Implements grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >.

◆ GetOutgoingInnerVertexAdjList() [1/2]

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , LoadStrategy _load_strategy = LoadStrategy::kOnlyOut>
const_adj_list_t grape::ImmutableEdgecutFragment< OID_T, VID_T, VDATA_T, EDATA_T, _load_strategy >::GetOutgoingInnerVertexAdjList ( const vertex_t v) const
inlineoverridevirtual

Returns the outgoing adjacent inner vertices of v.

Parameters
vInput vertex.
Returns
The outgoing adjacent inner vertices of v.

Implements grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >.

◆ GetOutgoingInnerVertexAdjList() [2/2]

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , LoadStrategy _load_strategy = LoadStrategy::kOnlyOut>
adj_list_t grape::ImmutableEdgecutFragment< OID_T, VID_T, VDATA_T, EDATA_T, _load_strategy >::GetOutgoingInnerVertexAdjList ( const vertex_t v)
inlineoverridevirtual

Returns the outgoing adjacent inner vertices of v.

Parameters
vInput vertex.
Returns
The outgoing adjacent inner vertices of v.

Implements grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >.

◆ GetOutgoingOuterVertexAdjList() [1/2]

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , LoadStrategy _load_strategy = LoadStrategy::kOnlyOut>
const_adj_list_t grape::ImmutableEdgecutFragment< OID_T, VID_T, VDATA_T, EDATA_T, _load_strategy >::GetOutgoingOuterVertexAdjList ( const vertex_t v) const
inlineoverridevirtual

Returns the outgoing adjacent outer vertices of v.

Parameters
vInput vertex.
Returns
The outgoing adjacent outer vertices of v.

Implements grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >.

◆ GetOutgoingOuterVertexAdjList() [2/2]

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , LoadStrategy _load_strategy = LoadStrategy::kOnlyOut>
adj_list_t grape::ImmutableEdgecutFragment< OID_T, VID_T, VDATA_T, EDATA_T, _load_strategy >::GetOutgoingOuterVertexAdjList ( const vertex_t v)
inlineoverridevirtual

Returns the outgoing adjacent outer vertices of v.

Parameters
vInput vertex.
Returns
The outgoing adjacent outer vertices of v.

Implements grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >.

◆ PrepareToRunApp()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , LoadStrategy _load_strategy = LoadStrategy::kOnlyOut>
void grape::ImmutableEdgecutFragment< OID_T, VID_T, VDATA_T, EDATA_T, _load_strategy >::PrepareToRunApp ( const CommSpec comm_spec,
PrepareConf  conf,
const ParallelEngineSpec pe_spec 
)
inlineoverridevirtual

For some kind of applications, specific data structures will be generated.

Parameters
strategy
need_split_edge

Implements grape::FragmentBase< OID_T, VDATA_T, EDATA_T >.

◆ SetData()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , LoadStrategy _load_strategy = LoadStrategy::kOnlyOut>
void grape::ImmutableEdgecutFragment< OID_T, VID_T, VDATA_T, EDATA_T, _load_strategy >::SetData ( const vertex_t v,
const VDATA_T &  val 
)
inlineoverridevirtual

Set the data of a vertex.

Parameters
vInput vertex.
valData to write.
Attention
This will only be applied locally, won't sync on other mirrors globally.

Implements grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >.