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
On 3/14/19 10:28 AM, Qiwen Chen wrote:
Is there an easy to extend the F (32-bit C float) type in BTrees ( such as IFBTree, LFBTree) to a DOUBLE type?
I currently use IOBTree and LOBTree for storing double type. But I would assume it's not as efficient.
There is no knob to allow that. You could cobble it together yourself, following the pattern for the float-value trees:
Copy 'BTrees/floatvalue.h' -> 'doublevalue.h' and make the appropriate changes (figure out which Python API calls need to change).
Add new interfaces to 'BTrees/Interfaces.py' (IIntegerDoubleBTreeModule, ILongDoubleBTreeMoudle)
Copy 'BTrees/_IFBTree.c' -> '_IDBTree.c' and make appopriate changes ('#include "doublevaluemacros.h"', etc. Ditto for 'BTrees/LFBTree.c'.
Copy 'BTrees/IFBTree.py' -> 'IDBTree.py' and make appropriate changes. Ditto for 'BTrees/LFBTree.py'.
Copy 'BTrees/tests/test_IFBTree.py' and make appropriate chagnes. Ditto for 'BTrees/tests/test_LFBtree.py'. You could maybe skip this part, but they would be required if you wanted to get your branch merged.
Update 'setup.py' to add the new 'FLAVORS' and 'FAMILIES' values.
Test thoroughly, including measuring RAM saved over the 'IO' / 'LO' variants. :)
The text was updated successfully, but these errors were encountered:
This was requested on the BTrees mailing list:
The text was updated successfully, but these errors were encountered: