<=>
to compare objects in a reverse order.See default_reverse_comparator
for an easy-to-use general stateless reverse
default comparator.
core $ DefaultReverseComparator :: SELF
Type of this instance, automatically specialized in every classcore :: Comparator :: bubble_sort
Bubble-sortarray
between from
and to
indices
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
core :: Comparator :: defaultinit
core :: Object :: defaultinit
core :: Comparator :: insertion_sort
Insertion-sortarray
between from
and to
indices
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: Comparator :: merge_sort
Merge-sortarray
between from
and to
indices
core :: Object :: output_class_name
Display class name on stdout (debug only).core :: Comparator :: quick_sort
Quick-sortarray
between from
and to
indices
# This comparator uses the operator `<=>` to compare objects in a reverse order.
#
# See `default_reverse_comparator` for an easy-to-use general stateless reverse
# default comparator.
class DefaultReverseComparator
super Comparator
redef type COMPARED: Comparable
# Returns `b <=> a`.
redef fun compare(a, b) do return b <=> a
end
lib/core/collection/sorter.nit:346,1--357,3