update headers
This commit is contained in:
@@ -31,7 +31,7 @@ class BinaryTreeArray {
|
||||
|
||||
// Simple fixed capacity stack
|
||||
template<typename TYPE, size_t CAPACITY,
|
||||
typename = typename std::enable_if<std::is_pod<TYPE>::value>::type>
|
||||
typename = typename std::enable_if<std::is_trivial<TYPE>::value>::type>
|
||||
class stack {
|
||||
TYPE mElements[CAPACITY];
|
||||
size_t mSize = 0;
|
||||
@@ -52,8 +52,10 @@ class BinaryTreeArray {
|
||||
|
||||
public:
|
||||
static size_t count(size_t height) noexcept { return (1u << height) - 1; }
|
||||
static size_t left(size_t i, size_t height) noexcept { return i + 1; }
|
||||
static size_t right(size_t i, size_t height) noexcept { return i + (1u << (height - 1)); }
|
||||
static size_t left(size_t i, size_t /*height*/) noexcept { return i + 1; }
|
||||
static size_t right(size_t i, size_t height) noexcept {
|
||||
return i + (size_t(1) << (height - 1));
|
||||
}
|
||||
|
||||
// this builds the depth-first binary tree array top down (post-order)
|
||||
template<typename Leaf, typename Node>
|
||||
|
||||
Reference in New Issue
Block a user