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
{{ message }}
This repository was archived by the owner on Oct 24, 2025. It is now read-only.
In many cases the T type used with BTreeG contains the key and other fields (in some cases, many other fields). It is awkward to create a "full" T object with only the key initialized just to pass to Get() or Delete() or AscendRange().
My proposal is to define K as the key type and create the btree using a LessFunc<K> as well as a func (t T) K which returns the key from a T object. Methods like Get(), Delete(), or AscendRange() would only take a K. The current BTreeG can be reimplemented in terms of this tree, with K = T.
In many cases the
Ttype used withBTreeGcontains the key and other fields (in some cases, many other fields). It is awkward to create a "full"Tobject with only the key initialized just to pass toGet()orDelete()orAscendRange().My proposal is to define
Kas the key type and create the btree using aLessFunc<K>as well as afunc (t T) Kwhich returns the key from a T object. Methods likeGet(),Delete(), orAscendRange()would only take aK. The currentBTreeGcan be reimplemented in terms of this tree, with K = T.