2022-04-01 04:06:53 +00:00
|
|
|
/***
|
|
|
|
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
|
|
|
|
File: auBST.hpp
|
|
|
|
Date: 2022-2-1
|
|
|
|
Author: Reece
|
|
|
|
***/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#if !defined(AURORA_RUNTIME_AU_BST)
|
|
|
|
#define AURORA_RUNTIME_AU_BST std::map
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "auHashUtils.hpp"
|
|
|
|
|
2024-04-19 23:09:22 +00:00
|
|
|
template <class T, typename Z, typename LessThan_t = AuHash::less<T>, class Allocator_t = Aurora::Memory::ClassArrayAllocator<AuPair<const T, Z>>>
|
|
|
|
using AuBST = AURORA_RUNTIME_AU_BST<T, Z, LessThan_t, Allocator_t>;
|
2023-03-13 16:59:21 +00:00
|
|
|
|
2024-04-20 22:38:11 +00:00
|
|
|
template <class T, typename Z, typename LessThan_t = AuHash::less<T>>
|
|
|
|
using AuBSTOfHeap = AuBST<T, Z, LessThan_t, Aurora::Memory::CppHeapWrapper<AuPair<const T, Z>>>;
|
|
|
|
|
2023-03-13 16:59:21 +00:00
|
|
|
template<typename T>
|
|
|
|
struct AuIsBST : AuFalseType
|
|
|
|
{ };
|
|
|
|
|
2024-04-19 23:09:22 +00:00
|
|
|
template<typename T, typename Z, typename A, typename B>
|
|
|
|
struct AuIsBST<AuBST<T, Z, A, B>> : AuTrueType
|
2023-03-13 16:59:21 +00:00
|
|
|
{ };
|
|
|
|
|
|
|
|
template <class T>
|
|
|
|
inline constexpr bool AuIsBST_v = AuIsBST<T>::type::value;
|