Template Class LocalEdgeIndex

Class Documentation

template <typename SrcT, typename DestT, typename StorageT = DefaultEdgeIndexStorage<SrcT, DestT>>
class LocalEdgeIndex

The LocalEdgeIndex data structure.

SHAD’s LocalEdgeIndex is a “local”, thread-safe, associative container, representive a collection of neighbors lists of a graph. LocalEdgeIndexs can be used ONLY on the Locality on which they are created.

Public Functions

LocalEdgeIndex(const size_t numVertices)

Constructor.

Parameters
  • numVertices: Expected number of vertices.

LocalEdgeIndex(const size_t numVertices, const typename StorageT::SrcAttributesT &initAttr)
size_t Size() const

Size of the edgeIndex (number of entries).

Return
the size of the edgeIndex.

size_t UpdateNumEdges()
void Insert(const SrcT &src, const DestT &dest)
void Insert(const SrcT &src, const typename StorageT::LocalEdgeListChunk &chunk)
void AsyncInsert(rt::Handle &handle, const SrcT &src, const typename StorageT::LocalEdgeListChunk &chunk)
void InsertEdgeList(const SrcT &src, const DestT *destinations, size_t numDest, bool overwrite = true)
void AsyncInsertEdgeList(rt::Handle &handle, const SrcT &src, const DestT *destinations, size_t numDest, bool overwrite = true)
void AsyncInsert(rt::Handle &handle, const SrcT &src, const DestT &dest)
void Erase(const SrcT &src, const DestT &dest)
void AsyncErase(rt::Handle &handle, const SrcT &src, const DestT &dest)
size_t GetDegree(const SrcT &src)
StorageT::NeighborListStorageT *GetNeighbors(const SrcT &src)
void AsyncGetNeighbors(rt::Handle &handle, const SrcT src, typename StorageT::NeighborListStorageT **res)
template <typename ApplyFunT, typename... Args>
void ForEachNeighbor(const SrcT &src, ApplyFunT &&function, Args&... args)
template <typename ApplyFunT, typename... Args>
void AsyncForEachNeighbor(rt::Handle &handle, const SrcT &src, ApplyFunT &&function, Args&... args)
template <typename ApplyFunT, typename... Args>
void ForEachVertex(ApplyFunT &&function, Args&... args)
template <typename ApplyFunT, typename... Args>
void AsyncForEachVertex(rt::Handle &handle, ApplyFunT &&function, Args&... args)
template <typename ApplyFunT, typename... Args>
void ForEachEdge(ApplyFunT &&function, Args&... args)
template <typename ApplyFunT, typename... Args>
void AsyncForEachEdge(rt::Handle &handle, ApplyFunT &&function, Args&... args)
template <typename ApplyFunT, typename... Args>
void ForEachAttributedVertexNeighbor(const SrcT &src, ApplyFunT &&function, Args&... args)
template <typename ApplyFunT, typename... Args>
void AsyncForEachAttributedVertexNeighbor(rt::Handle &handle, const SrcT &src, ApplyFunT &&function, Args&... args)
template <typename ApplyFunT, typename... Args>
void ForEachAttributedVertex(ApplyFunT &&function, Args&... args)
template <typename ApplyFunT, typename... Args>
void AsyncForEachAttributedVertex(rt::Handle &handle, ApplyFunT &&function, Args&... args)
StorageT::SrcAttributesT *GetVertexAttributes(const SrcT &src)
bool GetVertexAttributes(const SrcT &src, typename StorageT::SrcAttributesT *attr)
template <typename ApplyFunT, typename... Args>
void VertexAttributesApply(const SrcT &src, ApplyFunT &&function, Args&... args)
StorageT *GetEdgesPtr()

Friends

friend shad::LocalEdgeIndex::LocalSet