- 
                Notifications
    You must be signed in to change notification settings 
- Fork 6
Make any coloring algorithm compatible with SMC #263
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
| Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@            Coverage Diff            @@
##              main      #263   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           17        17           
  Lines         1955      1962    +7     
=========================================
+ Hits          1955      1962    +7     ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
 | 
| The diff is quite big, it will be hard to review it soon. | 
| @amontoison I removed the  | 
| Gentle bump @amontoison, this one is ready for you while #267 marinates. PS: I deactivated the formatting test because it passes locally and I can't figure out what's wrong. More generally, JuliaFormatter seems less and less reliable, so I'll soon switch to Runic anyway. | 
| I will have a look today. I got a visitor last week at ANL that stayed at home. I should be less busy this week! | 
| Also it seems the GPU tests are failing for unrelated reasons | 
| 
 We ordered a new SSD for  | 
| All tests passed, you can merge it when it is good for you 👍 | 
Fixes #67
Context
At the moment, DI can only use algorithms from SMC, but people might want to code other coloring algorithms following the ADTypes interface, for instance our friend @SouthEndMusic who was interested in provably optimal colorings. During decompression, we will still need SMC result types, but those are deeply tied to the coloring algorithm itself (for star and acyclic colorings + their bidirectional counterparts). How do we create SMC results from a generic algorithm which outputs only a vector of colors?
Idea
Pretend we run the greedy algorithm, but force the color choices and piggyback on the rest of the procedure for constructing data structures like the
StarSetandTreeSet. This enables maximum code reuse, even though it may not be optimal from a performance standpoint.As a side bonus, this also allows us to assert correctness of the provided colorings, because our greedy procedure enforces it.
Todo
ADTypes.NoColoringAlgorithm) => done withOptimalColoringAlgorithmbased on a JuMP formulation, but removed from the current PRADTypes.symmetric_coloringorADTypes.bidirectional_coloring