libgrape-lite
A C++ library for parallel graph processing
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T > Class Template Referenceabstract

IEdgecutFragment defines the interfaces of fragments with edgecut. To learn more about edge-cut and vertex-cut, please refers to https://spark.apache.org/docs/1.6.2/graphx-programming-guide.html#optimized-representation. More...

#include <edgecut_fragment_base.h>

Inheritance diagram for grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >:
grape::FragmentBase< OID_T, VDATA_T, EDATA_T > grape::CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, ImmutableEdgecutFragmentTraits< OID_T, VID_T, VDATA_T, EDATA_T > > grape::CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, MutableEdgecutFragmentTraits< OID_T, VID_T, VDATA_T, EDATA_T > > grape::CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T > grape::ImmutableEdgecutFragment< OID_T, VID_T, VDATA_T, EDATA_T, grape::LoadStrategy::kOnlyOut > grape::ImmutableEdgecutFragment< OID_T, VID_T, VDATA_T, EDATA_T, _load_strategy > grape::MutableEdgecutFragment< OID_T, VID_T, VDATA_T, EDATA_T, _load_strategy > grape::cuda::HostFragment< OID_T, VID_T, VDATA_T, EDATA_T, _load_strategy >

Public Types

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

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.
 
size_t GetVerticesNum () const override
 Returns the number of vertices in this fragment.
 
size_t GetTotalVerticesNum () const override
 Returns the number of vertices in the entire graph.
 
bool GetVertex (const OID_T &oid, Vertex< VID_T > &v) const
 Get a vertex with original ID vid.
 
OID_T GetId (const Vertex< VID_T > &v) const
 Get the original ID of a vertex.
 
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.
 
virtual const VDATA_T & GetData (const Vertex< VID_T > &v) const =0
 Get the data of a vertex.
 
virtual void SetData (const Vertex< VID_T > &v, const VDATA_T &val)=0
 Set the data of a vertex.
 
virtual bool HasChild (const Vertex< VID_T > &v) const =0
 Check if vertex v has a child, that is, existing an edge v->u.
 
virtual bool HasParent (const Vertex< VID_T > &v) const =0
 Check if vertex v has a parent, that is, existing an edge u->v.
 
virtual int GetLocalInDegree (const Vertex< VID_T > &v) const =0
 Returns the in-degree of vertex v in this fragment.
 
virtual int GetLocalOutDegree (const Vertex< VID_T > &v) const =0
 Returns the out-degree of vertex v in this fragment.<Paste>
 
virtual AdjList< VID_T, EDATA_T > GetIncomingAdjList (const Vertex< VID_T > &v)=0
 Returns the incoming adjacent vertices of v.
 
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
 
virtual AdjList< VID_T, EDATA_T > GetOutgoingAdjList (const Vertex< VID_T > &v)=0
 Returns the outgoing adjacent vertices of v.
 
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
 
VID_T GetInnerVerticesNum () const
 Returns the number of inner vertices in this fragment.
 
VID_T GetOuterVerticesNum () const
 Returns the number of outer vertices in this fragment.
 
const inner_vertices_t & InnerVertices () const
 Returns the vertex range of inner vertices in this fragment.
 
const outer_vertices_t & OuterVertices () const
 Returns the vertex range of outer vertices in this fragment.
 
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.
 
bool IsOuterVertex (const Vertex< VID_T > &v) const
 Check if vertex v is outer vertex of this fragment.
 
bool GetInnerVertex (const OID_T &oid, Vertex< VID_T > &v) const
 Get a inner vertex with original ID vid.
 
OID_T GetInnerVertexId (vertex_t v) const
 Get the original ID of an inner vertex.
 
OID_T GetOuterVertexId (vertex_t v) const
 Get the original ID of an outer vertex.
 
bool InnerVertexGid2Vertex (VID_T gid, Vertex< VID_T > &v) const
 Convert from global id to an inner vertex handle.
 
bool OuterVertexGid2Vertex (VID_T gid, Vertex< VID_T > &v) const
 Convert from global id to an outer vertex handle.
 
virtual VID_T GetOuterVertexGid (vertex_t v) const =0
 Convert from inner vertex handle to its global id.
 
VID_T GetInnerVertexGid (vertex_t v) const
 Convert from outer vertex handle to its global id.
 
virtual DestList IEDests (const Vertex< VID_T > &v) const =0
 Return the incoming edge destination fragment ID list of a inner vertex.
 
virtual size_t IEDestsSize () const =0
 
virtual DestList OEDests (const Vertex< VID_T > &v) const =0
 Return the outgoing edge destination fragment ID list of a inner vertex.
 
virtual size_t OEDestsSize () const =0
 
virtual DestList IOEDests (const Vertex< VID_T > &v) const =0
 Return the edge destination fragment ID list of a inner vertex.
 
virtual size_t IOEDestsSize () const =0
 
virtual AdjList< VID_T, EDATA_T > GetIncomingInnerVertexAdjList (const Vertex< VID_T > &v)=0
 Returns the incoming adjacent inner vertices of v.
 
virtual ConstAdjList< VID_T, EDATA_T > GetIncomingInnerVertexAdjList (const Vertex< VID_T > &v) const =0
 Returns the incoming adjacent inner vertices of v.
 
virtual AdjList< VID_T, EDATA_T > GetIncomingOuterVertexAdjList (const Vertex< VID_T > &v)=0
 Returns the incoming adjacent outer vertices of v.
 
virtual ConstAdjList< VID_T, EDATA_T > GetIncomingOuterVertexAdjList (const Vertex< VID_T > &v) const =0
 Returns the incoming adjacent outer vertices of v.
 
virtual AdjList< VID_T, EDATA_T > GetOutgoingInnerVertexAdjList (const Vertex< VID_T > &v)=0
 Returns the outgoing adjacent inner vertices of v.
 
virtual ConstAdjList< VID_T, EDATA_T > GetOutgoingInnerVertexAdjList (const Vertex< VID_T > &v) const =0
 Returns the outgoing adjacent inner vertices of v.
 
virtual AdjList< VID_T, EDATA_T > GetOutgoingOuterVertexAdjList (const Vertex< VID_T > &v)=0
 Returns the outgoing adjacent outer vertices of v.
 
virtual ConstAdjList< VID_T, EDATA_T > GetOutgoingOuterVertexAdjList (const Vertex< VID_T > &v) const =0
 Returns the outgoing adjacent outer vertices of v.
 
bool Gid2Vertex (const vid_t &gid, vertex_t &v) const
 Convert from global id to a vertex handle.
 
vid_t Vertex2Gid (const vertex_t &v) const
 Convert from vertex handle to its global id.
 
fid_t fid () const
 Returns the ID of this fragment.
 
fid_t fnum () const
 Returns the number of fragments.
 
- 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.
 
fid_t fid () const
 Returns the ID of this fragment.
 
fid_t fnum () const
 Returns the number of fragments.
 
virtual size_t GetEdgeNum () const =0
 Returns the number of edges in this fragment.
 
virtual void PrepareToRunApp (const CommSpec &comm_spec, PrepareConf conf, const ParallelEngineSpec &pe_spec)=0
 For some kind of applications, specific data structures will be generated.
 

Static Public Attributes

static constexpr FragmentType fragment_type = FragmentType::kEdgeCut
 

Protected Member Functions

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

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_
 

Detailed Description

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

IEdgecutFragment defines the interfaces of fragments with edgecut. To learn more about edge-cut and vertex-cut, please refers to https://spark.apache.org/docs/1.6.2/graphx-programming-guide.html#optimized-representation.

If we have an edge a->b cutted by the partitioner, and a is in frag_0, and b in frag_1. Then: a->b is a crossing edge, a is an inner_vertex in frag_0, b is an outer_vertex in frag_0.

Template Parameters
OID_T
VID_T
VDATA_T
EDATA_T
TRAITS_T

Member Function Documentation

◆ fid()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
fid_t grape::FragmentBase< OID_T, VDATA_T, EDATA_T >::fid ( ) const
inline

Returns the ID of this fragment.

Returns
The ID of this fragment.

◆ fnum()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
fid_t grape::FragmentBase< OID_T, VDATA_T, EDATA_T >::fnum ( ) const
inline

Returns the number of fragments.

Returns
The number of fragments.

◆ GetData()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
virtual const VDATA_T & grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::GetData ( const Vertex< VID_T > &  v) const
pure virtual

◆ 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 ( const Vertex< VID_T > &  u) const
inline

Get the ID of fragment the input vertex belongs to.

Parameters
uInput vertex.
Returns
Its fragment ID.

◆ GetId()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
OID_T grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::GetId ( const Vertex< VID_T > &  v) const
inline

Get the original ID of a vertex.

Parameters
vInput vertex.
Returns
Its original ID.

◆ GetIncomingAdjList() [1/2]

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
virtual ConstAdjList< VID_T, EDATA_T > grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::GetIncomingAdjList ( const Vertex< VID_T > &  v) const
pure virtual

◆ GetIncomingAdjList() [2/2]

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 ( const Vertex< VID_T > &  v)
pure virtual

◆ GetIncomingInnerVertexAdjList() [1/2]

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
virtual ConstAdjList< VID_T, EDATA_T > grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::GetIncomingInnerVertexAdjList ( const Vertex< VID_T > &  v) const
pure virtual

◆ GetIncomingInnerVertexAdjList() [2/2]

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 >::GetIncomingInnerVertexAdjList ( const Vertex< VID_T > &  v)
pure virtual

◆ GetIncomingOuterVertexAdjList() [1/2]

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
virtual ConstAdjList< VID_T, EDATA_T > grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::GetIncomingOuterVertexAdjList ( const Vertex< VID_T > &  v) const
pure virtual

◆ GetIncomingOuterVertexAdjList() [2/2]

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 >::GetIncomingOuterVertexAdjList ( const Vertex< VID_T > &  v)
pure virtual

◆ GetInnerVertex()

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 >::GetInnerVertex ( const OID_T &  oid,
Vertex< VID_T > &  v 
) const
inline

Get a inner vertex with original ID vid.

Parameters
vidOriginal ID.
vGot vertex.
Returns
True if find a inner vertex with original ID vid in this fragment, false otherwise.

◆ GetInnerVertexGid()

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 >::GetInnerVertexGid ( vertex_t  v) const
inline

Convert from outer vertex handle to its global id.

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

◆ GetInnerVertexId()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
OID_T grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::GetInnerVertexId ( vertex_t  v) const
inline

Get the original ID of an inner vertex.

Parameters
vInput vertex.
Returns
The original ID.

◆ 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 ( ) const
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 >
virtual int grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::GetLocalInDegree ( const Vertex< VID_T > &  v) const
pure virtual

◆ GetLocalOutDegree()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
virtual int grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::GetLocalOutDegree ( const Vertex< VID_T > &  v) const
pure virtual

◆ GetOuterVertexGid()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
virtual VID_T grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::GetOuterVertexGid ( vertex_t  v) const
pure virtual

◆ GetOuterVertexId()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
OID_T grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::GetOuterVertexId ( vertex_t  v) const
inline

Get the original ID of an outer vertex.

Parameters
vInput vertex.
Returns
The original ID.

◆ GetOuterVerticesNum()

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 >::GetOuterVerticesNum ( ) const
inline

Returns the number of outer vertices in this fragment.

Returns
The number of outer vertices in this fragment.

◆ GetOutgoingAdjList() [1/2]

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
virtual ConstAdjList< VID_T, EDATA_T > grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::GetOutgoingAdjList ( const Vertex< VID_T > &  v) const
pure virtual

◆ GetOutgoingAdjList() [2/2]

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 ( const Vertex< VID_T > &  v)
pure virtual

◆ GetOutgoingInnerVertexAdjList() [1/2]

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
virtual ConstAdjList< VID_T, EDATA_T > grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::GetOutgoingInnerVertexAdjList ( const Vertex< VID_T > &  v) const
pure virtual

◆ GetOutgoingInnerVertexAdjList() [2/2]

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 >::GetOutgoingInnerVertexAdjList ( const Vertex< VID_T > &  v)
pure virtual

◆ GetOutgoingOuterVertexAdjList() [1/2]

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
virtual ConstAdjList< VID_T, EDATA_T > grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::GetOutgoingOuterVertexAdjList ( const Vertex< VID_T > &  v) const
pure virtual

◆ GetOutgoingOuterVertexAdjList() [2/2]

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 >::GetOutgoingOuterVertexAdjList ( const Vertex< VID_T > &  v)
pure virtual

◆ GetTotalVerticesNum()

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

Returns the number of vertices in the entire graph.

Returns
The number of vertices in the entire graph.

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

◆ GetVertex()

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 >::GetVertex ( const OID_T &  oid,
Vertex< VID_T > &  v 
) const
inline

Get a vertex with original ID vid.

Parameters
vidOriginal ID.
vGot vertex.
Returns
If find the vertex in this fragment, return true. Otherwise, return false.

◆ GetVerticesNum()

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

Returns the number of vertices in this fragment.

Returns
The number of vertices in this fragment.

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

◆ Gid2Vertex()

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 >::Gid2Vertex ( const vid_t &  gid,
vertex_t v 
) const
inline

Convert from global id to a vertex handle.

Parameters
gidInput global id.
vOutput vertex handle.
Returns
True if exists a vertex with global id as gid in this fragment, false otherwise.

◆ HasChild()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
virtual bool grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::HasChild ( const Vertex< VID_T > &  v) const
pure virtual

◆ HasParent()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
virtual bool grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::HasParent ( const Vertex< VID_T > &  v) const
pure virtual

◆ IEDests()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
virtual DestList grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::IEDests ( const Vertex< VID_T > &  v) const
pure virtual

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

Note
: For inner vertex v of fragment-0, if outer vertex u and w are parents of v. u belongs to fragment-1 and w belongs to fragment-2, then 1 and 2 are in incoming edge destination fragment ID list of v.
: This method is encapsulated in the corresponding sending message API, SendMsgThroughIEdges, so it is not recommended to use this method directly in application programs.
Parameters
vInput vertex.
Returns
The incoming edge destination fragment ID list.

Implemented in grape::CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >, grape::CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, ImmutableEdgecutFragmentTraits< OID_T, VID_T, VDATA_T, EDATA_T > >, and grape::CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, MutableEdgecutFragmentTraits< OID_T, VID_T, VDATA_T, EDATA_T > >.

◆ InnerVertexGid2Vertex()

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 >::InnerVertexGid2Vertex ( VID_T  gid,
Vertex< VID_T > &  v 
) const
inline

Convert from global id to an inner vertex handle.

Parameters
gidInput global id.
vOutput vertex handle.
Returns
True if exists an inner vertex of this fragment with global id as gid, false otherwise.

◆ InnerVertices()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
const inner_vertices_t & grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::InnerVertices ( ) const
inline

Returns the vertex range of inner vertices in this fragment.

Returns
The vertex range of inner vertices in this fragment.

◆ IOEDests()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
virtual DestList grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::IOEDests ( const Vertex< VID_T > &  v) const
pure virtual

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

Note
: For inner vertex v of fragment-0, if outer vertex u and w are neighbors of v. u belongs to fragment-1 and w belongs to fragment-2, then 1 and 2 are in outgoing edge destination fragment ID list of v.
: This method is encapsulated in the corresponding sending message API, SendMsgThroughEdges, so it is not recommended to use this method directly in application programs.
Parameters
vInput vertex.
Returns
The edge destination fragment ID list.

Implemented in grape::CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >, grape::CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, ImmutableEdgecutFragmentTraits< OID_T, VID_T, VDATA_T, EDATA_T > >, and grape::CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, MutableEdgecutFragmentTraits< OID_T, VID_T, VDATA_T, EDATA_T > >.

◆ 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 ( const Vertex< VID_T > &  v) const
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 ( const Vertex< VID_T > &  v) const
inline

Check if vertex v is outer vertex of this fragment.

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

◆ OEDests()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
virtual DestList grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::OEDests ( const Vertex< VID_T > &  v) const
pure virtual

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

Note
: For inner vertex v of fragment-0, if outer vertex u and w are children of v. u belongs to fragment-1 and w belongs to fragment-2, then 1 and 2 are in outgoing edge destination fragment ID list of v.
: This method is encapsulated in the corresponding sending message API, SendMsgThroughOEdges, so it is not recommended to use this method directly in application programs.
Parameters
vInput vertex.
Returns
The outgoing edge destination fragment ID list.

Implemented in grape::CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >, grape::CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, ImmutableEdgecutFragmentTraits< OID_T, VID_T, VDATA_T, EDATA_T > >, and grape::CSREdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, MutableEdgecutFragmentTraits< OID_T, VID_T, VDATA_T, EDATA_T > >.

◆ OuterVertexGid2Vertex()

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 >::OuterVertexGid2Vertex ( VID_T  gid,
Vertex< VID_T > &  v 
) const
inline

Convert from global id to an outer vertex handle.

Parameters
gidInput global id.
vOutput vertex handle.
Returns
True if exists an outer vertex of this fragment with global id as gid, false otherwise.

◆ OuterVertices()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
const outer_vertices_t & grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::OuterVertices ( ) const
inline

Returns the vertex range of outer vertices in this fragment.

Returns
The vertex range of outer vertices in this fragment.

◆ SetData()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , typename TRAITS_T >
virtual void grape::EdgecutFragmentBase< OID_T, VID_T, VDATA_T, EDATA_T, TRAITS_T >::SetData ( const Vertex< VID_T > &  v,
const VDATA_T &  val 
)
pure virtual

◆ Vertex2Gid()

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 >::Vertex2Gid ( const vertex_t v) const
inline

Convert from vertex handle to its global id.

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

◆ 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 ( ) const
inline

Get all vertices referenced to this fragment.

Returns
A vertex set can be iterate on.