From 14433f0cd6986f9c18cfe2a70d7af4a4daaead19 Mon Sep 17 00:00:00 2001 From: Phil Ratzloff Date: Sun, 25 May 2025 13:10:05 -0400 Subject: [PATCH] Fix missing #include in Windows Add missing #include for std::iota Add static_cast to avoid compiler warning --- include/graph/algorithm/connected_components.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/graph/algorithm/connected_components.hpp b/include/graph/algorithm/connected_components.hpp index ddd59dc..9e6ed38 100644 --- a/include/graph/algorithm/connected_components.hpp +++ b/include/graph/algorithm/connected_components.hpp @@ -1,4 +1,4 @@ -/** +/** * @file connected_components.hpp * * @brief Single-Source Shortest paths and shortest sistances algorithms using Dijkstra & @@ -21,6 +21,7 @@ #include "graph/views/breadth_first_search.hpp" #include #include +#include #ifndef GRAPH_CC_HPP # define GRAPH_CC_HPP @@ -155,7 +156,7 @@ template static vertex_id_t sample_frequent_element(Component& component, size_t num_samples = 1024) { std::unordered_map counts(32); std::mt19937 gen; - std::uniform_int_distribution distribution(0, component.size() - 1); + std::uniform_int_distribution distribution(0, static_cast(component.size() - 1)); for (size_t i = 0; i < num_samples; ++i) { vertex_id_t sample = distribution(gen);