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

#include <dynamic_graph.hpp>

Public Member Functions

 DynamicGraph (std::size_t vertices=0, bool directed=false)
 
std::size_t vertex_count () const noexcept
 
std::uint64_t version () const noexcept
 
bool directed () const noexcept
 
void ensure_vertex (VertexId v)
 
void bulk_load_edges (const std::vector< std::pair< VertexId, VertexId > > &edges)
 
void add_edge (VertexId u, VertexId v)
 
void remove_edge (VertexId u, VertexId v)
 
void apply (const UpdateBatch &batch)
 
std::vector< VertexIdneighbors (VertexId u) const
 
std::vector< VertexIdin_neighbors (VertexId v) const
 
template<class Fn >
void for_each_neighbor (VertexId u, Fn &&fn) const
 
template<class Fn >
void for_each_in_neighbor (VertexId v, Fn &&fn) const
 
bool is_compact () const noexcept
 
std::span< const VertexIdcompact_neighbors (VertexId u) const noexcept
 
std::span< const VertexIdcompact_in_neighbors (VertexId v) const noexcept
 
bool has_edge (VertexId u, VertexId v) const
 
std::size_t edge_count_directed () const noexcept
 
std::size_t base_edge_count_directed () const noexcept
 
std::size_t delta_edge_count () const noexcept
 
std::size_t storage_bytes () const noexcept
 
double delta_ratio () const noexcept
 
std::size_t dirty_out_segment_count () const
 
std::size_t dirty_in_segment_count () const
 
bool maybe_compact (double threshold=0.25)
 
void compact ()
 

Detailed Description

Definition at line 479 of file dynamic_graph.hpp.

Constructor & Destructor Documentation

◆ DynamicGraph()

velographx::DynamicGraph::DynamicGraph ( std::size_t  vertices = 0,
bool  directed = false 
)
inlineexplicit

Member Function Documentation

◆ add_edge()

void velographx::DynamicGraph::add_edge ( VertexId  u,
VertexId  v 
)
inline

Definition at line 531 of file dynamic_graph.hpp.

References velographx::UpdateBatch::add(), and apply().

◆ apply()

◆ base_edge_count_directed()

std::size_t velographx::DynamicGraph::base_edge_count_directed ( ) const
inlinenoexcept

Definition at line 593 of file dynamic_graph.hpp.

◆ bulk_load_edges()

◆ compact()

void velographx::DynamicGraph::compact ( )
inline

◆ compact_in_neighbors()

std::span< const VertexId > velographx::DynamicGraph::compact_in_neighbors ( VertexId  v) const
inlinenoexcept

◆ compact_neighbors()

std::span< const VertexId > velographx::DynamicGraph::compact_neighbors ( VertexId  u) const
inlinenoexcept

◆ delta_edge_count()

std::size_t velographx::DynamicGraph::delta_edge_count ( ) const
inlinenoexcept

◆ delta_ratio()

double velographx::DynamicGraph::delta_ratio ( ) const
inlinenoexcept

◆ directed()

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

Definition at line 491 of file dynamic_graph.hpp.

Referenced by velographx::consolidate_to_csr_snapshot().

◆ dirty_in_segment_count()

std::size_t velographx::DynamicGraph::dirty_in_segment_count ( ) const
inline

Definition at line 616 of file dynamic_graph.hpp.

◆ dirty_out_segment_count()

std::size_t velographx::DynamicGraph::dirty_out_segment_count ( ) const
inline

Definition at line 612 of file dynamic_graph.hpp.

◆ edge_count_directed()

std::size_t velographx::DynamicGraph::edge_count_directed ( ) const
inlinenoexcept

◆ ensure_vertex()

void velographx::DynamicGraph::ensure_vertex ( VertexId  v)
inline

◆ for_each_in_neighbor()

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

Definition at line 565 of file dynamic_graph.hpp.

◆ for_each_neighbor()

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

Definition at line 560 of file dynamic_graph.hpp.

◆ has_edge()

bool velographx::DynamicGraph::has_edge ( VertexId  u,
VertexId  v 
) const
inline

◆ in_neighbors()

std::vector< VertexId > velographx::DynamicGraph::in_neighbors ( VertexId  v) const
inline

Definition at line 555 of file dynamic_graph.hpp.

◆ is_compact()

bool velographx::DynamicGraph::is_compact ( ) const
inlinenoexcept

◆ maybe_compact()

bool velographx::DynamicGraph::maybe_compact ( double  threshold = 0.25)
inline

◆ neighbors()

std::vector< VertexId > velographx::DynamicGraph::neighbors ( VertexId  u) const
inline

◆ remove_edge()

void velographx::DynamicGraph::remove_edge ( VertexId  u,
VertexId  v 
)
inline

Definition at line 537 of file dynamic_graph.hpp.

References apply(), and velographx::UpdateBatch::remove().

◆ storage_bytes()

◆ version()

std::uint64_t velographx::DynamicGraph::version ( ) const
inlinenoexcept

◆ vertex_count()

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

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