-
Notifications
You must be signed in to change notification settings - Fork 45
Backtracking Sequential Coloring #52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-Authored-By: Mathieu Besançon <[email protected]>
index = i | ||
break | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible that index=-1
after the loop?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. Since x
is a vertex in the graph, we can be sure that it'll be present in vector A
as well. So index would always lie between [1, nv(g)]
once that code block executes.
Co-Authored-By: Mathieu Besançon <[email protected]>
Co-Authored-By: Mathieu Besançon <[email protected]>
Co-Authored-By: Mathieu Besançon <[email protected]>
…o bsc updated branch using github
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, @ChrisRackauckas I think this can be merged
Project.toml
Outdated
@@ -12,6 +12,7 @@ LightGraphs = "093fc24a-ae57-5d10-9952-331d41423f4d" | |||
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" | |||
Requires = "ae029012-a4dd-5104-9daa-d747884805df" | |||
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" | |||
SparsityDetection = "684fba80-ace3-11e9-3d08-3bc7ed6f96df" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need SparsityDetection? And why in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey thanks for pointing it out. I added it at some point because I thought its absence was breaking my tests (it wasn't) and forgot to remove it from the list of dependencies afterward.
Fixed.
@ChrisRackauckas Can we merge this now? I want to start pushing the code for the next coloring algorithm so it'd be nice if we can close this. |
Looks great! The latest email was still saying WIP for some reason so I just ignored it since I'm behind from JuliaCon work. |
BSC is a coloring algorithm which gives a complete tight coloring of the graph using minimum number of colors possible (
x(G)
, the chromatic number of graphG
)Currently I am using this paper as a reference.
Unit tests for only those functions which are not immediately obvious have been added, and tests for the main function will be added once the function starts working as intended.
#29