<=>
to compare objects.see default_comparator
for an easy-to-use general stateless default comparator.
core :: DefaultComparator :: defaultinit
core $ DefaultComparator :: 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 :: DefaultComparator :: defaultinit
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.
# see `default_comparator` for an easy-to-use general stateless default comparator.
class DefaultComparator
super Comparator
redef type COMPARED: Comparable
# Return a <=> b
redef fun compare(a, b) do return a <=> b
end
lib/core/collection/sorter.nit:337,1--344,3