You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The UpdateMaxCounts function updates the termFrequencyCountChildMax field, which is also the field by which the Node.Children Lists are sorted. Since the sort call comes before the UpdateMaxCounts call in the following code, each layer is not actually guaranteed to be in sorted order.
Also, because UpdateMaxCounts updates termFrequencyCountChildMax in potentially all ancestor nodes, those layers would need to be sorted as well if every layer is supposed to maintain sorted order.
The text was updated successfully, but these errors were encountered:
The
UpdateMaxCounts
function updates thetermFrequencyCountChildMax
field, which is also the field by which theNode.Children
Lists are sorted. Since thesort
call comes before theUpdateMaxCounts
call in the following code, each layer is not actually guaranteed to be in sorted order.PruningRadixTrie/PruningRadixTrie/PruningRadixTrie.cs
Lines 126 to 136 in 40b01f3
And there is no
sort
call after thisUpdateMaxCounts
:PruningRadixTrie/PruningRadixTrie/PruningRadixTrie.cs
Lines 56 to 61 in 40b01f3
In practice, this can subtly worsen performance.
Also, because
UpdateMaxCounts
updatestermFrequencyCountChildMax
in potentially all ancestor nodes, those layers would need to be sorted as well if every layer is supposed to maintain sorted order.The text was updated successfully, but these errors were encountered: