コード例 #1
0
 void exclusivePush(Stack <ChunkSolutionRect> solution, ChunkSolutionRect entry)
 {
     if (!entry.IsEmpty)
     {
         if (solution.Count == 0)
         {
             solution.Push(entry);
         }
         else
         {
             var last = solution.Pop();
             last.TrimOff(entry); // the popped off one, AND remove common records from new set
             entry.TrimOff(last); // now remove the common records from older one set, from latest set, to make them mutually exclusive
             solution.Push(last);
             solution.Push(entry);
         }
     }
 }