nitc :: CatalogScoreSorter :: catalog=
Catalog used to access scoresnitc $ CatalogScoreSorter :: SELF
Type of this instance, automatically specialized in every classcore :: Comparator :: bubble_sort
Bubble-sortarray
between from
and to
indices
core :: Comparator :: build_heap
nitc :: CatalogScoreSorter :: catalog=
Catalog used to access scorescore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
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
# Sort the mpackages by their score
class CatalogScoreSorter
super Comparator
# Catalog used to access scores
var catalog: Catalog
redef type COMPARED: MPackage
redef fun compare(a, b) do
if not catalog.mpackages_stats.has_key(a) then return 1
if not catalog.mpackages_stats.has_key(b) then return -1
var astats = catalog.mpackages_stats[a]
var bstats = catalog.mpackages_stats[b]
return bstats.score <=> astats.score
end
end
src/catalog/catalog.nit:623,1--639,3