Skip to main content

worth_storing

Function worth_storing 

Source
pub fn worth_storing(count: usize, covered: usize, bytes: usize) -> bool
Expand description

部分木を表に入れる値打ちがあるか。 count は部分木が作った要素の数、covered はそのうち子孫の項目(当たり・登録)から来た数、bytes は量の見積もり。 子孫の項目にある分が半分を超え、しかも小さくない(SMALL_ENTRY_BYTES 超え)なら入れない (祖先ごとに同じ要素の写しを持たないため)。