nxt.bijections

Bijections between scalar types and integers.

TOOD extract reinterpret!T(x)

TODO: support real?

Members

Aliases

IntegralBijectableTypes
alias IntegralBijectableTypes = AliasSeq!(bool, char, wchar, dchar, ubyte, ushort, uint, ulong, byte, short, int, long, float, double)

List of types that are bijectable to builtin integral types.

Enums

isIntegralBijectableType
eponymoustemplate isIntegralBijectableType(T)
Undocumented in source.

Functions

bijectFromUnsigned
void bijectFromUnsigned(U a, U b)
void bijectFromUnsigned(U a, V b)
void bijectFromUnsigned(ubyte a, bool b)
void bijectFromUnsigned(ubyte a, char b)
void bijectFromUnsigned(ushort a, wchar b)
void bijectFromUnsigned(ulong a, dchar b)
void bijectFromUnsigned(uint a, float b)
void bijectFromUnsigned(ulong a, double b)

Biject (Shift) an unsigned a "back down" to the corresponding signed type (for instance after radix sorting an array of a).

bijectToUnsigned
auto bijectToUnsigned(T a)

Biject (shift) a signed a "up" to the corresponding unsigned type (for instance before radix sorting an array of a).

bijectToUnsigned
auto bijectToUnsigned(T a, bool descending)

Same as bijectToUnsigned with extra argument descending that reverses order.

ff
uint ff(uint f)
ulong ff(ulong f)

Map bits of floating point number \p a to unsigned integer that can be radix sorted.

iff
uint iff(uint f)
ulong iff(ulong f)

Map a floating point number \p a back from radix sorting

Meta