From 2a9a32fc2abf0cb4e16a684a44e103a2aab1f1ef Mon Sep 17 00:00:00 2001 From: Moritz Schauer Date: Thu, 5 Dec 2024 13:02:38 +0100 Subject: [PATCH] Type of vertices irrelevant in that loop (#413) I changed it because it makes using other <:Integer's more tedious --- src/SimpleGraphs/simpledigraph.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SimpleGraphs/simpledigraph.jl b/src/SimpleGraphs/simpledigraph.jl index 4b7605a1a..56f9e3653 100644 --- a/src/SimpleGraphs/simpledigraph.jl +++ b/src/SimpleGraphs/simpledigraph.jl @@ -40,8 +40,8 @@ julia> SimpleDiGraph(UInt8(10)) ``` """ function SimpleDiGraph{T}(n::Integer=0) where {T<:Integer} - fadjlist = [Vector{T}() for _ in one(T):n] - badjlist = [Vector{T}() for _ in one(T):n] + fadjlist = [Vector{T}() for _ in 1:n] + badjlist = [Vector{T}() for _ in 1:n] return SimpleDiGraph(0, fadjlist, badjlist) end