From 35e76eac52d5fbb370ddb92810d7daf4ea684beb Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Fri, 1 Dec 2023 16:12:57 +0100 Subject: core: Experimental changes to tree and mcts --- c++/core/tree.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'c++/core/tree.h') diff --git a/c++/core/tree.h b/c++/core/tree.h index 6316a5e..32572fc 100644 --- a/c++/core/tree.h +++ b/c++/core/tree.h @@ -25,7 +25,8 @@ private: /** * Object holding the treeed branch instances */ - std::vector> children_; + using branch = std::variant>; + std::vector children_; public: /** * Default constructor @@ -101,14 +102,14 @@ public: /** * Returns the branch at i */ - branch& at(std::size_t i){ + branch& at(std::size_t i){ return children_.at(i); } /** * Returns the branch at i */ - const branch& at(std::size_t i) const { + const branch& at(std::size_t i) const { return children_.at(i); } }; -- cgit v1.2.3