Skip to content

Commit

Permalink
Hex not binary (requires c++14)
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Smith committed Jul 9, 2020
1 parent de48281 commit b94c192
Showing 1 changed file with 17 additions and 64 deletions.
81 changes: 17 additions & 64 deletions src/tree_distances.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,70 +27,23 @@ const cost BIG = ((std::numeric_limits<cost>::max)() / MAX_SPLITS);

const splitbit right16bits = 65535U;
const splitbit powers_of_two[64] = {
0b1,
0b10,
0b100,
0b1000,
0b10000,
0b100000,
0b1000000,
0b10000000,
0b100000000,
0b1000000000,
0b10000000000,
0b100000000000,
0b1000000000000,
0b10000000000000,
0b100000000000000,
0b1000000000000000,
0b10000000000000000,
0b100000000000000000,
0b1000000000000000000,
0b10000000000000000000,
0b100000000000000000000,
0b1000000000000000000000,
0b10000000000000000000000,
0b100000000000000000000000,
0b1000000000000000000000000,
0b10000000000000000000000000,
0b100000000000000000000000000,
0b1000000000000000000000000000,
0b10000000000000000000000000000,
0b100000000000000000000000000000,
0b1000000000000000000000000000000,
0b10000000000000000000000000000000,
0b100000000000000000000000000000000,
0b1000000000000000000000000000000000,
0b10000000000000000000000000000000000,
0b100000000000000000000000000000000000,
0b1000000000000000000000000000000000000,
0b10000000000000000000000000000000000000,
0b100000000000000000000000000000000000000,
0b1000000000000000000000000000000000000000,
0b10000000000000000000000000000000000000000,
0b100000000000000000000000000000000000000000,
0b1000000000000000000000000000000000000000000,
0b10000000000000000000000000000000000000000000,
0b100000000000000000000000000000000000000000000,
0b1000000000000000000000000000000000000000000000,
0b10000000000000000000000000000000000000000000000,
0b100000000000000000000000000000000000000000000000,
0b1000000000000000000000000000000000000000000000000,
0b10000000000000000000000000000000000000000000000000,
0b100000000000000000000000000000000000000000000000000,
0b1000000000000000000000000000000000000000000000000000,
0b10000000000000000000000000000000000000000000000000000,
0b100000000000000000000000000000000000000000000000000000,
0b1000000000000000000000000000000000000000000000000000000,
0b10000000000000000000000000000000000000000000000000000000,
0b100000000000000000000000000000000000000000000000000000000,
0b1000000000000000000000000000000000000000000000000000000000,
0b10000000000000000000000000000000000000000000000000000000000,
0b100000000000000000000000000000000000000000000000000000000000,
0b1000000000000000000000000000000000000000000000000000000000000,
0b10000000000000000000000000000000000000000000000000000000000000,
0b100000000000000000000000000000000000000000000000000000000000000,
0b1000000000000000000000000000000000000000000000000000000000000000};
0x1, 0x2, 0x4, 0x8,
0x10, 0x20, 0x40, 0x80,
0x100, 0x200, 0x400, 0x800,
0x1000, 0x2000, 0x4000, 0x8000,
0x10000, 0x20000, 0x40000, 0x80000,
0x100000, 0x200000, 0x400000, 0x800000,
0x1000000, 0x2000000, 0x4000000, 0x8000000,
0x10000000, 0x20000000, 0x40000000, 0x80000000,
0x100000000, 0x200000000, 0x400000000, 0x800000000,
0x1000000000, 0x2000000000, 0x4000000000, 0x8000000000,
0x10000000000, 0x20000000000, 0x40000000000, 0x80000000000,
0x100000000000, 0x200000000000, 0x400000000000, 0x800000000000,
0x1000000000000, 0x2000000000000, 0x4000000000000, 0x8000000000000,
0x10000000000000, 0x20000000000000, 0x40000000000000, 0x80000000000000,
0x100000000000000, 0x200000000000000, 0x400000000000000, 0x800000000000000,
0x1000000000000000, 0x2000000000000000, 0x4000000000000000, 0x8000000000000000
};

const cost ROUND_PRECISION = 2048 * 2048;

Expand Down

0 comments on commit b94c192

Please sign in to comment.