Compares a and b in a qsort callback/D opCmp fashion. a and b are uint128_t values composed from alo and ahi or blo and bhi, respectively.
Delete node from the tree if it was linked in. Mark the node unused.
Tells whether a is equal to b. a and b are uint128_t values composed from alo and ahi or blo and bhi, respectively.
Return leftmost node in the tree, or NULL if none
Tells whether a is greater than b. a and b are uint128_t values composed from alo and ahi or blo and bhi, respectively.
Tells whether a is greater than or equal to b. a and b are uint128_t values composed from alo and ahi or blo and bhi, respectively.
See original's library documentation for details.
Return rightmost node in the tree, or NULL if none
Tells whether a is less than b. a and b are uint128_t values composed from alo and ahi or blo and bhi, respectively.
Tells whether a is less than or equal to b. a and b are uint128_t values composed from alo and ahi or blo and bhi, respectively.
See original's library documentation for details.
See original's library documentation for details.
See original's library documentation for details.
Return next node in the tree, or NULL if none
Return next node in the tree, skipping duplicates, or NULL if none
Obtains node->key,and decomposes it into two uint64_t values. This assumes that the key was originally unsigned, e.g. set by eb128_node_setkey_264().
Sets node->key to an uint128_t value composed from lo and hi.
Return previous node in the tree, or NULL if none
Return previous node in the tree, skipping duplicates, or NULL if none
Compares a and b in a qsort callback/D opCmp fashion. a and b are int128_t values composed from alo and ahi or blo and bhi, respectively.
Tells whether a is equal to b. a and b are int128_t values composed from alo and ahi or blo and bhi, respectively.
Tells whether a is greater than b. a and b are int128_t values composed from alo and ahi or blo and bhi, respectively.
Tells whether a is greater or equal to than b. a and b are int128_t values composed from alo and ahi or blo and bhi, respectively.
See original's library documentation for details.
Tells whether a is less than b. a and b are int128_t values composed from alo and ahi or blo and bhi, respectively.
Tells whether a is less than or equal to b. a and b are int128_t values composed from alo and ahi or blo and bhi, respectively.
See original's library documentation for details.
Obtains node->key,and decomposes it into an int64_t and an uint64_t value. This assumes that the key was originally signed, e.g. set by eb128i_node_setkey_264().
Sets node->key to an int128_t value composed from lo and hi.
cent emulator struct
ucent emulator struct
See original's library documentation for details.
Boost Software License Version 1.0. See LICENSE_BOOST.txt for details. Alternatively, this file may be distributed under the terms of the Tango 3-Clause BSD License (see LICENSE_BSD.txt for details).
Bear in mind this module provides bindings to an external library that has its own license, which might be more restrictive. Please check the external library license to see which conditions apply for linking.
Copyright (c) 2009-2016 dunnhumby Germany GmbH. All rights reserved.
Bindings for Elastic Binary Trees library's operations on 128bit nodes.
This module contains the D binding of the library functions of eb128tree.h. Please consult the original header documentation for details.
eb128tree.h uses a 128-bit integer type for the node keys, which is not a part of the standard C language but provided as an extension by GCC 4.6 and later for targets that support it. These targets include x86-64 but not x86.
@see http://gcc.gnu.org/onlinedocs/gcc-4.6.2/gcc/_005f_005fint128.html @see http://gcc.gnu.org/gcc-4.6/changes.html
Since cent/ucent are currently not implemented, they need to be emulated by two 64-bit integer values (int + uint for cent, uint + uint for ucent). eb128tree.c provides dual-64-bit functions to interchange the 128-bit keys.
You need to have the library installed and link with -lebtree.