001package components.sortingmachine; 002 003import java.util.Comparator; 004import java.util.Iterator; 005 006import components.queue.Queue; 007import components.queue.Queue1L; 008 009/** 010 * {@code SortingMachine} represented as a {@link Queue} (using an embedding of 011 * selection sort), with implementations of primary methods. 012 * 013 * @param <T> 014 * type of {@code SortingMachine} entries 015 * @mathdefinitions <pre> 016 * IS_TOTAL_PREORDER ( 017 * r: binary relation on T 018 * ) : boolean is 019 * for all x, y, z: T 020 * ((r(x, y) or r(y, x)) and 021 * (if (r(x, y) and r(y, z)) then r(x, z))) 022 * </pre> 023 * @convention <pre> 024 * IS_TOTAL_PREORDER([relation computed by $this.machineOrder.compare method]) 025 * </pre> 026 * @correspondence <pre> 027 * this = 028 * ($this.insertionMode, $this.machineOrder, multiset_entries($this.entries)) 029 * </pre> 030 */ 031public class SortingMachine2<T> extends SortingMachineSecondary<T> { 032 033 /* 034 * 2221/2231 assignment code deleted. 035 */ 036 037}