mito2::compaction

Module run

Source
Expand description

This file contains code to find sorted runs in a set if ranged items and along with the best way to merge these items to satisfy the desired run count.

Structsยง

Traitsยง

  • Item ๐Ÿ”’
    Trait for items to merge.
  • Ranged ๐Ÿ”’
    Trait for any items with specific range.

Functionsยง

  • find_sorted_runs ๐Ÿ”’
    Finds sorted runs in given items.
  • merge_all_runs ๐Ÿ”’
  • reduce_runs ๐Ÿ”’
    Reduces the num of runs to given target and returns items to merge. The time complexity of this function is C_{k}_{runs.len()} where k=runs.len()-target+1.
  • sort_ranged_items ๐Ÿ”’