3#ifndef LALA_POWER_BRANCH_HPP
4#define LALA_POWER_BRANCH_HPP
6#include "battery/vector.hpp"
7#include "lala/logic/logic.hpp"
11template <
class TellTy,
class Alloc>
17 template <
class TellTy2,
class Alloc2>
21 battery::vector<tell_type, allocator_type> children;
28 CUDA
Branch(battery::vector<tell_type, allocator_type>&& children)
29 : children(std::move(children)), current_idx(-1) {}
31 template <
class BranchType>
33 : children(branch.children, alloc), current_idx(branch.current_idx) {}
36 return static_cast<int>(children.size());
41 return children[++current_idx];
49 return current_idx + 1 <
size();
57 return current_idx >=
size();
61 assert(current_idx != -1 && current_idx < children.size());
62 return children[current_idx];
CUDA int size() const
Definition branch.hpp:35
CUDA const tell_type & operator[](size_t idx)
Definition branch.hpp:44
CUDA Branch(const BranchType &branch, const allocator_type &alloc=allocator_type())
Definition branch.hpp:32
CUDA const tell_type & current() const
Definition branch.hpp:60
TellTy tell_type
Definition branch.hpp:14
CUDA void prune()
Definition branch.hpp:52
CUDA bool is_pruned() const
Definition branch.hpp:56
Alloc allocator_type
Definition branch.hpp:15
CUDA Branch(battery::vector< tell_type, allocator_type > &&children)
Definition branch.hpp:28
Branch(Branch &&)=default
CUDA bool has_next() const
Definition branch.hpp:48
Branch(const Branch &)=default
CUDA const tell_type & next()
Definition branch.hpp:39
CUDA Branch(const allocator_type &alloc=allocator_type())
Definition branch.hpp:25