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 * insertion sort), with implementations of primary methods.
012 *
013 * @param <T>
014 *            type of {@code SortingMachine} entries
015 * @mathdefinitions {@code
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 *
023 * IS_SORTED (
024 *   s: string of T,
025 *   r: binary relation on T
026 *  ) : boolean is
027 *  for all x, y: T where (<x, y> is substring of s) (r(x, y))
028 * }
029 * @convention <pre>
030 * IS_TOTAL_PREORDER([relation computed by $this.machineOrder.compare method])  and
031 * IS_SORTED($this.entries, [relation computed by $this.machineOrder.compare method])
032 * </pre>
033 * @correspondence <pre>
034 * this =
035 *   ($this.insertionMode, $this.machineOrder, multiset_entries($this.entries))
036 * </pre>
037 */
038public class SortingMachine3<T> extends SortingMachineSecondary<T> {
039
040    /*
041     * 2221/2231 assignment code deleted.
042     */
043
044}