Remove commented-out sanity check code in MultiBinEngine
This commit is contained in:
@@ -35,35 +35,6 @@ namespace SawCut.Nesting
|
||||
|
||||
result.ItemsNotUsed = remainingItems;
|
||||
|
||||
// sanity check
|
||||
|
||||
//var itemsNested = result.Bins.SelectMany(b => b.Items).ToList();
|
||||
//var lengths = items.Select(i => i.Length).Distinct();
|
||||
|
||||
//foreach (var length in lengths)
|
||||
//{
|
||||
// var nameLengthGroups1 = items.Where(i => i.Length == length).GroupBy(i => i.Name).ToList();
|
||||
// var nameLengthGroups2 = itemsNested.Where(i => i.Length == length).GroupBy(i => i.Name).ToList();
|
||||
|
||||
// foreach (var group in nameLengthGroups1)
|
||||
// {
|
||||
// var name = group.Key;
|
||||
|
||||
// var nestedWithSameName = nameLengthGroups2.FirstOrDefault(g => g.Key == group.Key);
|
||||
|
||||
// if (group.Count() != nestedWithSameName.Count())
|
||||
// {
|
||||
// throw new Exception("Failed sanity check.");
|
||||
|
||||
// }
|
||||
// }
|
||||
|
||||
// if (nameLengthGroups1.Count() != nameLengthGroups2.Count())
|
||||
// {
|
||||
// throw new Exception("Failed sanity check.");
|
||||
// }
|
||||
//}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user