From 2d0118308fdf09a1bc75d06d3779c18645659117 Mon Sep 17 00:00:00 2001 From: cat Date: Wed, 21 Jan 2026 08:12:32 +0200 Subject: [PATCH] First iteration of DKM --- headers/Containers/DualkeyMap.hpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 headers/Containers/DualkeyMap.hpp diff --git a/headers/Containers/DualkeyMap.hpp b/headers/Containers/DualkeyMap.hpp new file mode 100644 index 0000000..6d728f4 --- /dev/null +++ b/headers/Containers/DualkeyMap.hpp @@ -0,0 +1,31 @@ +/* + * SPDX-FileCopyrightText: Dora "cat" + * SPDX-License-Identifier: MPL-2.0 + * + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + */ +#ifndef GUARD_TOURMALINE_DUALKEYMAP_H +#define GUARD_TOURMALINE_DUALKEYMAP_H +#include +#include + +namespace Tourmaline::Containers { +template class DualkeyMap { + +private: + struct DualkeyHash { + DualkeyHash(std::size_t AHash, A *APointer, std::size_t BHash, B *BPointer) + : AKeyHash(AHash), APointer(APointer), BKeyHash(BHash), + BPointer(BPointer) {} + std::size_t AKeyHash = 0; + std::size_t BKeyHash = 0; + A *APointer; + B *BPointer; + }; + std::vector ValueList; + std::vector HashList{}; +}; +} // namespace Tourmaline::Containers +#endif