- A few Vulkan wrapper structs
- Framework for Vulkan context - Fixed a bug with dynarray where if `resize()` shrinks the array, destructors are not called. - Fixed grammar issues with the containers library and added property tables to existing data structures.
This commit is contained in:
@@ -42,6 +42,22 @@ namespace fennec
|
||||
|
||||
///
|
||||
/// \brief Structure defining a binary tree
|
||||
///
|
||||
/// \details
|
||||
/// | Property | Value |
|
||||
/// |:-----------:|:-----------:|
|
||||
/// | stable | ⛔ |
|
||||
/// | dynamic | ✅ |
|
||||
/// | homogeneous | ✅ |
|
||||
/// | distinct | ⛔ |
|
||||
/// | ordered | ⛔ |
|
||||
/// | space | \f$O(N)\f$ |
|
||||
/// | linear | ⛔ |
|
||||
/// | access | \f$O(1)\f$ |
|
||||
/// | find | \f$O(N)\f$ |
|
||||
/// | insertion | \f$O(1)\f$ |
|
||||
/// | deletion | \f$O(1)\f$ |
|
||||
///
|
||||
/// \tparam TypeT The data type
|
||||
/// \tparam AllocT An allocator class
|
||||
template<typename TypeT, class AllocT = allocator<TypeT>>
|
||||
@@ -52,10 +68,15 @@ private:
|
||||
struct node;
|
||||
|
||||
public:
|
||||
/// \name Definitions
|
||||
/// @{
|
||||
|
||||
using value_t = TypeT; //!< The element type
|
||||
using alloc_t = allocator_traits<AllocT>::template rebind<node>; //!< The allocator type
|
||||
static constexpr size_t npos = -1; //!< null position constant
|
||||
|
||||
/// @}
|
||||
|
||||
friend class iterator;
|
||||
friend class const_iterator;
|
||||
|
||||
@@ -145,7 +166,7 @@ public:
|
||||
|
||||
///
|
||||
/// \returns \f$true\f$ when there are no elements in the tree, \f$false\f$ otherwise.
|
||||
constexpr bool empty() const {
|
||||
constexpr bool is_empty() const {
|
||||
return _size == 0;
|
||||
}
|
||||
|
||||
@@ -159,7 +180,7 @@ public:
|
||||
/// \returns The next id to be returned by \f$insert\f$ or \f$emplace\f$.
|
||||
constexpr size_t next_id() const {
|
||||
size_t i = _size;
|
||||
if (not _freed.empty()) {
|
||||
if (not _freed.is_empty()) {
|
||||
i = _freed.front();
|
||||
}
|
||||
return i;
|
||||
@@ -455,7 +476,7 @@ public:
|
||||
queue.push_back(_root);
|
||||
}
|
||||
|
||||
while (not queue.empty()) {
|
||||
while (not queue.is_empty()) {
|
||||
size_t i = queue.front();
|
||||
queue.pop_front();
|
||||
|
||||
@@ -540,7 +561,7 @@ public:
|
||||
visit.push_back(chd);
|
||||
}
|
||||
|
||||
if (not visit.empty()) {
|
||||
if (not visit.is_empty()) {
|
||||
node = visit.front();
|
||||
visit.pop_front();
|
||||
} else {
|
||||
@@ -591,7 +612,7 @@ public:
|
||||
visit.push_front(chd);
|
||||
}
|
||||
|
||||
if (not visit.empty()) {
|
||||
if (not visit.is_empty()) {
|
||||
node = visit.front();
|
||||
visit.pop_front();
|
||||
} else {
|
||||
@@ -642,7 +663,7 @@ public:
|
||||
visit.push_front(next);
|
||||
}
|
||||
|
||||
if (not visit.empty()) {
|
||||
if (not visit.is_empty()) {
|
||||
node = visit.front();
|
||||
visit.pop_front();
|
||||
} else {
|
||||
@@ -692,7 +713,7 @@ public:
|
||||
visit.push_front(this->_successor(tree, pright));
|
||||
}
|
||||
|
||||
if (not visit.empty()) {
|
||||
if (not visit.is_empty()) {
|
||||
node = visit.front();
|
||||
visit.pop_front();
|
||||
} else {
|
||||
@@ -926,7 +947,7 @@ private:
|
||||
|
||||
constexpr size_t _next_free() {
|
||||
size_t i = _size;
|
||||
if (not _freed.empty()) {
|
||||
if (not _freed.is_empty()) {
|
||||
i = _freed.front();
|
||||
_freed.pop_front();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user