Skip to content

Commit 1df749b

Browse files
authored
Add files via upload
1 parent 4689ed6 commit 1df749b

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

multioptpy/Utils/rcmc.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@
2020
# ── Minimal stub base classes used when running as __main__ ──────────
2121
# These are NOT part of RCMCQueue and are never used in normal library
2222
# operation (multioptpy must be installed for that).
23-
class ExplorationQueue: # type: ignore[no-redef]
24-
"""Stub base class – library mode requires the real multioptpy."""
25-
def __init__(self, rng_seed: int = 42) -> None:
26-
self._tasks: list = []
27-
28-
def push(self, task) -> None:
29-
self._tasks.append(task)
23+
class ExplorationQueue:
24+
def __init__(self, rng_seed=42):
25+
self._tasks: dict = {}
26+
self._task_counter: int = 0
27+
28+
def push(self, task):
29+
self._task_counter += 1
30+
self._tasks[self._task_counter] = task
3031

3132
class ExplorationTask: # type: ignore[no-redef]
3233
"""Stub task object – mirrors the real ExplorationTask signature."""

0 commit comments

Comments
 (0)