libgrape-lite
A C++ library for parallel graph processing
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | List of all members
grape::CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T > Class Template Reference
Inheritance diagram for grape::CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >:
grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T > grape::FragmentBase< OID_T, VDATA_T, EDATA_T >

Public Types

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, TRAITS_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

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...
 
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...
 
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...
 
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
 
VID_T GetInnerVerticesNum () const
 Returns the number of inner vertices in this fragment. 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
 
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...
 
virtual const VDATA_T & GetData (const Vertex< VID_T > &v) const =0
 Get the data of a vertex. More...
 
virtual void SetData (const Vertex< VID_T > &v, const VDATA_T &val)=0
 Set the data of a vertex. More...
 
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
 
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
 
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...
 
virtual VID_T GetOuterVertexGid (vertex_t v) const =0
 Convert from inner vertex handle to its global id. More...
 
VID_T GetInnerVertexGid (vertex_t v) const
 Convert from outer vertex handle to its global id. More...
 
virtual AdjList< VID_T, EDATA_T > GetIncomingInnerVertexAdjList (const Vertex< VID_T > &v)=0
 Returns the incoming adjacent inner vertices of v. More...
 
virtual ConstAdjList< VID_T, EDATA_T > GetIncomingInnerVertexAdjList (const Vertex< VID_T > &v) const =0
 Returns the incoming adjacent inner vertices of v. More...
 
virtual AdjList< VID_T, EDATA_T > GetIncomingOuterVertexAdjList (const Vertex< VID_T > &v)=0
 Returns the incoming adjacent outer vertices of v. More...
 
virtual ConstAdjList< VID_T, EDATA_T > GetIncomingOuterVertexAdjList (const Vertex< VID_T > &v) const =0
 Returns the incoming adjacent outer vertices of v. More...
 
virtual AdjList< VID_T, EDATA_T > GetOutgoingInnerVertexAdjList (const Vertex< VID_T > &v)=0
 Returns the outgoing adjacent inner vertices of v. More...
 
virtual ConstAdjList< VID_T, EDATA_T > GetOutgoingInnerVertexAdjList (const Vertex< VID_T > &v) const =0
 Returns the outgoing adjacent inner vertices of v. More...
 
virtual AdjList< VID_T, EDATA_T > GetOutgoingOuterVertexAdjList (const Vertex< VID_T > &v)=0
 Returns the outgoing adjacent outer vertices of v. More...
 
virtual ConstAdjList< VID_T, EDATA_T > GetOutgoingOuterVertexAdjList (const Vertex< VID_T > &v) const =0
 Returns the outgoing adjacent outer vertices of v. 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...
 

Protected Types

using vertices_t = typename TRAITS_T::vertices_t
 

Protected Member Functions

void buildCSR (const vertices_t &vertex_range, std::vector< Edge< VID_T, EDATA_T >> &edges, LoadStrategy load_strategy, int concurrency=1)
 
template<typename IOADAPTOR_T >
void serialize (std::unique_ptr< IOADAPTOR_T > &writer)
 
template<typename IOADAPTOR_T >
void deserialize (std::unique_ptr< IOADAPTOR_T > &reader)
 
nbr_tget_ie_begin (const vertex_t &v)
 
nbr_tget_ie_end (const vertex_t &v)
 
const nbr_tget_ie_begin (const vertex_t &v) const
 
const nbr_tget_ie_end (const vertex_t &v) const
 
nbr_tget_oe_begin (const vertex_t &v)
 
nbr_tget_oe_end (const vertex_t &v)
 
const nbr_tget_oe_begin (const vertex_t &v) const
 
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
 
virtual bool OuterVertexGid2Lid (VID_T gid, VID_T &lid) const =0
 
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

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_ = false
 
bool odst_built_ = false
 
bool iodst_built_ = false
 
bool mirror_info_initialized_ = false
 
- 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_
 

Private Types

using csr_t = typename TRAITS_T::csr_t
 
using csr_builder_t = typename TRAITS_T::csr_builder_t
 

Private Member Functions

void initDestFidList (bool in_edge, bool out_edge, ImmutableCSR< VID_T, fid_t > &csr)
 
void buildMessageDestination (const MessageStrategy &msg_strategy)
 

Additional Inherited Members

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

Member Function Documentation

◆ GetEdgeNum()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
size_t grape::CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::GetEdgeNum ( ) const
inlineoverridevirtual

Returns the number of edges in this fragment.

Returns
The number of edges in this fragment.

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

◆ GetFragId()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
fid_t grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::GetFragId
inline

Get the ID of fragment the input vertex belongs to.

Parameters
uInput vertex.
Returns
Its fragment ID.

◆ GetIncomingAdjList() [1/3]

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
virtual AdjList<VID_T, EDATA_T> grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::GetIncomingAdjList

Returns the incoming adjacent vertices of v.

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

◆ GetIncomingAdjList() [2/3]

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
const_adj_list_t grape::CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::GetIncomingAdjList ( const vertex_t v) const
inlineoverridevirtual

Returns the incoming adjacent vertices of v.

Parameters
vInput vertex.
Returns
The incoming adjacent vertices of v.
Attention
Only inner vertex is available.

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

◆ GetIncomingAdjList() [3/3]

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
adj_list_t grape::CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::GetIncomingAdjList ( const vertex_t v)
inlineoverridevirtual

Returns the incoming adjacent vertices of v.

Parameters
vInput vertex.
Returns
The incoming adjacent vertices of v.
Attention
Only inner vertex is available.

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

◆ GetInnerVerticesNum()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
VID_T grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::GetInnerVerticesNum
inline

Returns the number of inner vertices in this fragment.

Returns
The number of inner vertices in this fragment.

◆ GetLocalInDegree()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
int grape::CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::GetLocalInDegree ( const vertex_t v) const
inlineoverridevirtual

Returns the in-degree of vertex v in this fragment.

Parameters
vInput vertex.
Returns
In-degree of vertex v in this fragment.

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

◆ GetLocalOutDegree()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
int grape::CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::GetLocalOutDegree ( const vertex_t v) const
inlineoverridevirtual

Returns the out-degree of vertex v in this fragment.<Paste>

Parameters
vInput vertex.
Returns
Out-degree of vertex v in this fragment.

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

◆ GetOutgoingAdjList() [1/3]

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
virtual AdjList<VID_T, EDATA_T> grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::GetOutgoingAdjList

Returns the outgoing adjacent vertices of v.

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

◆ GetOutgoingAdjList() [2/3]

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
const_adj_list_t grape::CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::GetOutgoingAdjList ( const vertex_t v) const
inlineoverridevirtual

Returns the outgoing adjacent vertices of v.

Parameters
vInput vertex.
Returns
The outgoing adjacent vertices of v.
Attention
Only inner vertex is available.

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

◆ GetOutgoingAdjList() [3/3]

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
adj_list_t grape::CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::GetOutgoingAdjList ( const vertex_t v)
inlineoverridevirtual

Returns the outgoing adjacent vertices of v.

Parameters
vInput vertex.
Returns
The outgoing adjacent vertices of v.
Attention
Only inner vertex is available.

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

◆ HasChild()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
bool grape::CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::HasChild ( const vertex_t v) const
inlineoverridevirtual

Check if vertex v has a child, that is, existing an edge v->u.

Parameters
vInput vertex.
Returns
True if vertex v has a child, false otherwise.

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

◆ HasParent()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
bool grape::CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::HasParent ( const vertex_t v) const
inlineoverridevirtual

Check if vertex v has a parent, that is, existing an edge u->v.

Parameters
vInput vertex.
Returns
True if vertex v has a parent, false otherwise.

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

◆ IEDests()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
DestList grape::CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::IEDests ( const vertex_t v) const
inlineoverridevirtual

Return the incoming edge destination fragment ID list of a inner vertex.

Parameters
vInput vertex.
Returns
The incoming edge destination fragment ID list.
Attention
This method is only available when application set message strategy as kAlongIncomingEdgeToOuterVertex.

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

◆ IOEDests()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
DestList grape::CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::IOEDests ( const vertex_t v) const
inlineoverridevirtual

Return the edge destination fragment ID list of a inner vertex.

Parameters
vInput vertex.
Returns
The edge destination fragment ID list.
Attention
This method is only available when application set message strategy as kAlongedge_toOuterVertex.

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

◆ IsBorderVertex()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
bool grape::CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::IsBorderVertex ( const vertex_t v) const
inline

Check if inner vertex v is an border vertex, that is, existing edge v->u or u->v, u is an outer vertex.

Parameters
vInput vertex.
Returns
True if vertex v is border vertex, false otherwise.
Attention
This method is only available when application set message strategy as kAlongEdgeToOuterVertex.

◆ IsIncomingBorderVertex()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
bool grape::CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::IsIncomingBorderVertex ( const vertex_t v) const
inline

Check if inner vertex v is an incoming border vertex, that is, existing edge u->v, u is an outer vertex.

Parameters
vInput vertex.
Returns
True if vertex v is incoming border vertex, false otherwise.
Attention
This method is only available when application set message strategy as kAlongOutgoingEdgeToOuterVertex.

◆ IsInnerVertex()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
bool grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::IsInnerVertex
inline

Check if vertex v is inner vertex of this fragment.

Parameters
vInput vertex.
Returns
True if vertex v is an inner vertex, false otherwise.

◆ IsOuterVertex()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
bool grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::IsOuterVertex
inline

Check if vertex v is outer vertex of this fragment.

Parameters
vInput vertex.
Returns
True if vertex v is outer vertex, false otherwise.

◆ IsOutgoingBorderVertex()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
bool grape::CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::IsOutgoingBorderVertex ( const vertex_t v) const
inline

Check if inner vertex v is an outgoing border vertex, that is, existing edge v->u, u is an outer vertex.

Parameters
vInput vertex.
Returns
True if vertex v is outgoing border vertex, false otherwise.
Attention
This method is only available when application set message strategy as kAlongIncomingEdgeToOuterVertex.

◆ OEDests()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
DestList grape::CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::OEDests ( const vertex_t v) const
inlineoverridevirtual

Return the outgoing edge destination fragment ID list of a Vertex.

Parameters
vInput vertex.
Returns
The outgoing edge destination fragment ID list.
Attention
This method is only available when application set message strategy as kAlongOutgoingedge_toOuterVertex.

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 , typename TRAITS_T >
void grape::CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::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 >.

Reimplemented in grape::ImmutableEdgecutFragment< OID_T, VID_T, VDATA_T, EDATA_T, grape::LoadStrategy::kOnlyOut >.

◆ Vertices()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
const vertices_t& grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::Vertices
inline

Get all vertices referenced to this fragment.

Returns
A vertex set can be iterate on.