This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make algorithm recursive
When a new color is required, repeat the color assignment process. This is the fastest part of the algorithm, so there's no noticable speed drop. Repeating the whole coloring ensures that newly added colors are properly balanced with respect to other colors, and avoids the situation where one of the last features to be colored requires a whole new class to be created, which will only have a few possible members. Overall this results in more balanced color assignment.
- Loading branch information
Showing 1 changed file with 3 additions and 3 deletions.