This class is used internally to agregate the behaviors of multiple comparators.
Use IndexMatches::sort(comparator...)
instead.
nitc :: MatchComparators :: _comparators
Comparator to use in the array ordernitc :: MatchComparators :: comparators
Comparator to use in the array ordernitc :: MatchComparators :: comparators=
Comparator to use in the array ordernitc :: MatchComparators :: defaultinit
nitc $ MatchComparators :: SELF
Type of this instance, automatically specialized in every classnitc :: MatchComparators :: _comparators
Comparator to use in the array ordercore :: Comparator :: bubble_sort
Bubble-sortarray
between from
and to
indices
core :: Comparator :: build_heap
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
nitc :: MatchComparators :: comparators
Comparator to use in the array ordernitc :: MatchComparators :: comparators=
Comparator to use in the array ordernitc :: ScoreComparator :: defaultinit
nitc :: MatchComparators :: defaultinit
core :: Object :: defaultinit
core :: Comparator :: 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 :: native_class_name
The class name of the object in CString format.core :: Object :: output_class_name
Display class name on stdout (debug only).core :: Comparator :: quick_sort
Quick-sortarray
between from
and to
indices
# A pipeline of comparators executed in inclusion order
#
# This class is used internally to agregate the behaviors of multiple comparators.
# Use `IndexMatches::sort(comparator...)` instead.
private class MatchComparators
super ScoreComparator
# Comparator to use in the array order
var comparators: Array[ScoreComparator]
# Compare with each comparator
#
# Return the compare value of the first one to return anything else than 0.
redef fun compare(o1, o2) do
for comparator in comparators do
var c = comparator.compare(o1, o2)
if c != 0 then return c
end
return 0
end
end
src/model/model_index.nit:562,1--582,3