Skip to content
This repository was archived by the owner on Aug 22, 2025. It is now read-only.

Commit 8bdab49

Browse files
committed
changed abstract types to concrete
1 parent d70c5db commit 8bdab49

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/coloring/backtracking_coloring.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ function color_graph(g::LightGraphs.AbstractGraph, ::BacktrackingColor)
1515

1616
#F is the coloring of vertices, 0 means uncolored
1717
#Fopt is the optimal coloring of the graph
18-
F = zeros(Integer, v)
19-
Fopt= zeros(Integer, v)
18+
F = zeros(Int, v)
19+
Fopt= zeros(Int, v)
2020

2121
start = 1
2222

@@ -28,14 +28,14 @@ function color_graph(g::LightGraphs.AbstractGraph, ::BacktrackingColor)
2828

2929
#colors[j] = number of colors in A[0]...A[j]
3030
#assume colors[0] = 1
31-
colors = zeros(Integer, v)
31+
colors = zeros(Int, v)
3232

3333
#set of free colors
34-
U = zeros(Integer, 0)
34+
U = zeros(Int, 0)
3535
push!(U, 1)
3636

3737
#set of free colors of x
38-
freeColors = [Vector{Integer}() for _ in 1:v]
38+
freeColors = [Vector{Int}() for _ in 1:v]
3939
freeColors[x] = copy(U)
4040

4141
while (start >= 1)
@@ -155,7 +155,7 @@ function free_colors(x::Integer,
155155
opt::Integer)
156156
index = -1
157157

158-
freecolors = zeros(Integer, 0)
158+
freecolors = zeros(Int, 0)
159159

160160
for i in eachindex(A)
161161
if A[i] == x
@@ -225,7 +225,7 @@ function remove_higher_colors(U::AbstractVector{<:Integer}, opt::Integer)
225225
if length(U) == 0
226226
return U
227227
end
228-
u = zeros(Integer, 0)
228+
u = zeros(Int, 0)
229229
for color in U
230230
if color < opt
231231
push!(u, color)

0 commit comments

Comments
 (0)