Add edge weights in class cycles to improve minimum cut correctness
Add edge weights in class cycles to improve minimum cut correctness