This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2023 AUTHORS | |
# | |
# SPDX-License-Identifier: BSL-1.0 | |
# Distributed under the Boost Software License, Version 1.0. (See accompanying | |
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
from typing import Optional, Tuple | |
from threading import Thread | |
from queue import Queue | |
import numpy as np | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// WeakMultiMap.swift | |
// Created by Nick on 19/02/2023. | |
// | |
import Combine | |
import Foundation | |
// MARK: - Weak Multi Map |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
/** | |
Implements a thread-safe generic data structure that can behave as a | |
stack or a queue. | |
*/ | |
struct Xixo<Element> { | |
enum Mode { | |
/** Stack mode provides a lifo data structure. */ |