+
Point of view
All features
expanded class COMPARATOR_COLLECTION_SORTER [X]
Summary
Overview
creation features
features
Auxiliary functions
set_comparator (a_comparator: FUNCTION[TUPLE[TUPLE 2[X, X]]])
effective procedure
comparator: FUNCTION[TUPLE[TUPLE 2[X, X]]]
writable attribute
lt (x: X, y: X): BOOLEAN
effective function
default_comparator (x: X, y: X): BOOLEAN
effective function
default_create
effective procedure
Default creation method.
with_comparator (a_comparator: FUNCTION[TUPLE[TUPLE 2[X, X]]])
effective procedure
gt (x: X, y: X): BOOLEAN
effective function
lte (x: X, y: X): BOOLEAN
effective function
gte (x: X, y: X): BOOLEAN
effective function
is_sorted (c: COLLECTION[X]): BOOLEAN
effective function
Is c already sorted ? Uses lte for comparison.
has (c: COLLECTION[X], element: X): BOOLEAN
effective function
index_of (c: COLLECTION[X], element: X): INTEGER_32
effective function
add (c: COLLECTION[X], element: X)
effective procedure
Add element in collection c keeping the sorted property.
insert_index (c: COLLECTION[X], element: X): INTEGER_32
effective function
retrieve the upper index for wich gt
sort (c: COLLECTION[X])
effective procedure
Sort c using the default most efficient sorting algorithm already implemented.
quick_sort (c: COLLECTION[X])
effective procedure
Sort c using the quick sort algorithm.
von_neuman_sort (c: COLLECTION[X])
effective procedure
Sort c using the Von Neuman algorithm.
heap_sort (c: COLLECTION[X])
effective procedure
Sort c using the heap sort algorithm.
bubble_sort (c: COLLECTION[X])
effective procedure
Sort c using the bubble sort algorithm.
von_neuman_line (src: COLLECTION[X], dest: COLLECTION[X], count: INTEGER_32, d_count: INTEGER_32, lower: INTEGER_32, imax: INTEGER_32)
effective procedure
von_neuman_inner_sort (src: COLLECTION[X], dest: COLLECTION[X], sg1: INTEGER_32, count: INTEGER_32, imax: INTEGER_32)
effective procedure
heap_repair (c: COLLECTION[X], c_lower: INTEGER_32, first: INTEGER_32, last: INTEGER_32)
effective procedure
Repair the heap from the node number first It considers that the last item of c is number last It supposes that children are heaps.
quick_sort_region (c: COLLECTION[X], left: INTEGER_32, right: INTEGER_32)
effective procedure