libgrape-lite
A C++ library for parallel graph processing
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
grape::VertexMap< OID_T, VID_T > Class Template Reference

Public Types

using oid_t = OID_T
 
using vid_t = VID_T
 
using internal_oid_t = typename InternalOID< OID_T >::type
 

Public Member Functions

 VertexMap (const VertexMap &)=delete
 
fid_t GetFragmentNum () const
 
fid_t GetFragmentId (const OID_T &oid) const
 
const IdParser< VID_T > & GetIdParser () const
 
const IPartitioner< OID_T > & GetPartitioner () const
 
VID_T Lid2Gid (fid_t fid, const VID_T &lid) const
 
fid_t GetFidFromGid (const VID_T &gid) const
 
VID_T GetLidFromGid (const VID_T &gid) const
 
VID_T MaxVertexNum () const
 
size_t GetTotalVertexSize () const
 
size_t GetInnerVertexSize (fid_t fid) const
 
void UpdateToBalance (const CommSpec &comm_spec, const std::vector< VID_T > &vnum_list, const std::vector< std::vector< VID_T >> &gid_maps)
 
bool GetOid (const VID_T &gid, OID_T &oid) const
 
bool GetInternalOid (const VID_T &gid, internal_oid_t &oid) const
 
bool GetOid (fid_t fid, const VID_T &lid, OID_T &oid) const
 
bool GetInternalOid (fid_t fid, const VID_T &lid, internal_oid_t &oid) const
 
bool GetGid (fid_t fid, const OID_T &oid, VID_T &gid) const
 
bool GetGid (const OID_T &oid, VID_T &gid) const
 
bool GetGidFromInternalOid (fid_t fid, const internal_oid_t &oid, VID_T &gid) const
 
bool GetGidFromInternalOid (const internal_oid_t &oid, VID_T &gid) const
 
void reset ()
 
void ExtendVertices (const CommSpec &comm_spec, std::vector< OID_T > &&local_vertices_to_add)
 
template<typename IOADAPTOR_T >
void Serialize (const std::string &prefix, const CommSpec &comm_spec)
 
template<typename IOADAPTOR_T >
void Deserialize (const std::string &prefix, const CommSpec &comm_spec)
 
VertexMapoperator= (VertexMap &&other)
 
PartitionerType partitioner_type () const
 
IdxerType idxer_type () const
 

Private Member Functions

template<typename IOADAPTOR >
void serialize_impl (const std::string &path)
 
template<typename IOADAPTOR >
void deserialize_impl (const std::string &path)
 

Private Attributes

fid_t fid_
 
fid_t fnum_
 
IdxerType idxer_type_
 
size_t total_vertex_size_
 
std::vector< size_t > inner_vertex_size_
 
std::unique_ptr< IPartitioner< OID_T > > partitioner_
 
std::vector< std::unique_ptr< IdxerBase< OID_T, VID_T > > > idxers_
 
IdParser< VID_T > id_parser_
 

Friends

template<typename _OID_T , typename _VID_T >
class VertexMapBuilder