VeloGraphX
High-performance dynamic graph analytics in C++20
Loading...
Searching...
No Matches
velographx::CsrGraph Class Reference

#include <csr_graph.hpp>

Public Types

using Edge = std::pair< VertexId, VertexId >
 

Public Member Functions

 CsrGraph ()=default
 
 CsrGraph (std::vector< Edge > edges, bool directed=false)
 
std::size_t vertex_count () const noexcept
 
std::size_t edge_entry_count () const noexcept
 
bool directed () const noexcept
 
std::span< const VertexIdneighbors (VertexId v) const
 
std::span< const VertexIdin_neighbors (VertexId v) const
 
std::size_t degree (VertexId v) const
 
bool has_edge (VertexId u, VertexId v) const
 
template<class Fn >
void for_each_neighbor (VertexId v, Fn &&fn) const
 
template<class Fn >
void for_each_in_neighbor (VertexId v, Fn &&fn) const
 

Detailed Description

Definition at line 10 of file csr_graph.hpp.

Member Typedef Documentation

◆ Edge

Definition at line 12 of file csr_graph.hpp.

Constructor & Destructor Documentation

◆ CsrGraph() [1/2]

velographx::CsrGraph::CsrGraph ( )
default

◆ CsrGraph() [2/2]

velographx::CsrGraph::CsrGraph ( std::vector< Edge edges,
bool  directed = false 
)

Member Function Documentation

◆ degree()

std::size_t velographx::CsrGraph::degree ( VertexId  v) const

◆ directed()

bool velographx::CsrGraph::directed ( ) const
inlinenoexcept

Definition at line 19 of file csr_graph.hpp.

◆ edge_entry_count()

std::size_t velographx::CsrGraph::edge_entry_count ( ) const
inlinenoexcept

Definition at line 18 of file csr_graph.hpp.

◆ for_each_in_neighbor()

template<class Fn >
void velographx::CsrGraph::for_each_in_neighbor ( VertexId  v,
Fn &&  fn 
) const
inline

Definition at line 31 of file csr_graph.hpp.

References in_neighbors().

◆ for_each_neighbor()

template<class Fn >
void velographx::CsrGraph::for_each_neighbor ( VertexId  v,
Fn &&  fn 
) const
inline

Definition at line 26 of file csr_graph.hpp.

References neighbors().

◆ has_edge()

bool velographx::CsrGraph::has_edge ( VertexId  u,
VertexId  v 
) const

◆ in_neighbors()

std::span< const VertexId > velographx::CsrGraph::in_neighbors ( VertexId  v) const

Referenced by for_each_in_neighbor().

◆ neighbors()

std::span< const VertexId > velographx::CsrGraph::neighbors ( VertexId  v) const

Referenced by for_each_neighbor().

◆ vertex_count()

std::size_t velographx::CsrGraph::vertex_count ( ) const
inlinenoexcept

Definition at line 17 of file csr_graph.hpp.


The documentation for this class was generated from the following file: