class interface DS_SHELL_SORTER[G->COMPARABLE]

feature(s) from DS_SORTER
   --  Status report

   sorted (a_container: DS_INDEXABLE[G]): BOOLEAN
      --  Is a_container sorted in increasing order?

      require
         a_container_not_void: a_container /= Void

   reverse_sorted (a_container: DS_INDEXABLE[G]): BOOLEAN
      --  Is a_container sorted in decreasing order?

      require
         a_container_not_void: a_container /= Void

feature(s) from DS_SORTER
   --  Sort

   sort (a_container: DS_INDEXABLE[G])
      --  Sort a_container in increasing order.

      require
         a_container_not_void: a_container /= Void
      ensure
         sorted: sorted(a_container)

   reverse_sort (a_container: DS_INDEXABLE[G])
      --  Sort a_container in decreasing order.

      require
         a_container_not_void: a_container /= Void
      ensure
         sorted: reverse_sorted(a_container)

feature(s) from DS_INDEXABLE_SORTER
   --  Status report

   subsorted (a_container: DS_INDEXABLE[G]; lower, upper: INTEGER): BOOLEAN
      --  Is a_container sorted in increasing order
      --  within bounds lower..upper?

      require
         a_container_not_void: a_container /= Void;
         valid_lower: 1 <= lower and lower <= a_container.count;
         valid_upper: 1 <= upper and upper <= a_container.count;
         valid_bounds: lower <= upper

   reverse_subsorted (a_container: DS_INDEXABLE[G]; lower, upper: INTEGER): BOOLEAN
      --  Is a_container sorted in decreasing order
      --  within bounds lower..upper?

      require
         a_container_not_void: a_container /= Void;
         valid_lower: 1 <= lower and lower <= a_container.count;
         valid_upper: 1 <= upper and upper <= a_container.count;
         valid_bounds: lower <= upper

feature(s) from DS_INDEXABLE_SORTER
   --  Sort

   subsort (a_container: DS_INDEXABLE[G]; lower, upper: INTEGER)
      --  Sort a_container in increasing order
      --  within bounds lower..upper.

      require
         a_container_not_void: a_container /= Void;
         valid_lower: 1 <= lower and lower <= a_container.count;
         valid_upper: 1 <= upper and upper <= a_container.count;
         valid_bounds: lower <= upper
      ensure
         subsorted: subsorted(a_container,lower,upper)

   reverse_subsort (a_container: DS_INDEXABLE[G]; lower, upper: INTEGER)
      --  Sort a_container in decreasing order
      --  within bounds lower..upper.

      require
         a_container_not_void: a_container /= Void;
         valid_lower: 1 <= lower and lower <= a_container.count;
         valid_upper: 1 <= upper and upper <= a_container.count;
         valid_bounds: lower <= upper
      ensure
         subsorted: reverse_subsorted(a_container,lower,upper)


end of DS_SHELL_SORTER[G->COMPARABLE]