27 if (batch.
empty())
return;
28 for (
const auto& op : batch.
updates) {
29 if (op.src == op.dst)
continue;
41 std::uint64_t triple = 0;
53 throw std::invalid_argument(
54 "IncrementalTriangleCount requires an undirected graph; directed motifs need an explicit definition");
62 std::uint64_t common = 0;
85 if (batch.
empty())
return;
86 for (
const auto& op : batch.
updates) {
87 if (op.src == op.dst)
continue;
92 graph_.apply_unversioned(op);
95 graph_.automatic_storage_maintenance();
BasicIncrementalTriangleCount(Graph &graph, std::uint64_t trusted_initial_count)
void validate_graph() const
void apply(const UpdateBatch &batch)
BasicIncrementalTriangleCount(Graph &graph)
std::uint64_t value() const noexcept
std::uint64_t common_neighbors(VertexId a, VertexId b) const
bool has_edge(VertexId u, VertexId v) const
IncrementalTriangleCount(DynamicGraph &graph, std::uint64_t trusted_initial_count)
IncrementalTriangleCount(DynamicGraph &graph)
void apply(const UpdateBatch &batch)
void apply_updates(Graph &graph, const Batch &batch)
void for_each_neighbor(const Graph &graph, VertexId u, Fn &&fn)
bool has_edge(const Graph &graph, VertexId u, VertexId v)
constexpr bool is_directed(const Graph &graph)
std::size_t neighbor_count(const Graph &graph, VertexId u)
constexpr std::size_t vertex_count(const Graph &graph)
bool empty() const noexcept
std::vector< EdgeUpdate > updates