![]() |
Fleet
0.0.9
Inference in the LOT
|
#include <MinimalMCTSNode.h>
Additional Inherited Members | |
![]() | |
using | data_t = typename HYP::data_t |
![]() | |
MCTSBase () | |
MCTSBase (HYP &start, this_t *par, size_t w) | |
MCTSBase (HYP &start, double ex, data_t *d) | |
MCTSBase (const this_t &m) | |
MCTSBase (this_t &&m) | |
void | operator= (const MCTSBase &m) |
void | operator= (MCTSBase &&m) |
void | print (HYP from, std::ostream &o, const int depth, const bool sort) |
void | print (HYP &start, const bool sort=true) |
void | print (HYP &start, const char *filename, const bool sort=true) |
void | add_sample (const float v) |
virtual generator< HYP & > | run_thread (Control &ctl, HYP h0) override |
virtual void | process_evaluable (HYP ¤t) |
If we can evaluate this current node (usually: compute a posterior and add_sample) More... | |
virtual void | add_children (HYP ¤t) |
This gets called before descending the tree if we don't have all of our children. NOTE: This could add all the children (default) or be overwritten to add one, or none. More... | |
virtual int | sample_child_index (HYP ¤t) |
virtual this_t * | descend_to_childless (HYP ¤t) |
This goes down the tree to a node with no children (OR evaluable) More... | |
virtual this_t * | descend_to_evaluable (HYP ¤t) |
This goes down the tree, sampling children until it finds an evaluable (building a full tree) More... | |
![]() | |
virtual generator< HYP &> | run_thread (Control &ctl, Args... args)=0 |
ThreadedInferenceInterface () | |
unsigned long | next_index () |
Return the next index to operate on (in a thread-safe way). More... | |
size_t | nthreads () |
How many threads are currently run in this interface? More... | |
void | run_thread_generator_wrapper (size_t thr, Control &ctl, Args... args) |
We have to wrap run_thread in something that manages the sync with main. This really just synchronizes the output of run_thread with run below. NOTE this makes a copy of x into the local next_x, so that when the thread keeps running, it doesn't mess anything up. We may in the future block the thread and return a reference, but its not clear that's faster. More... | |
generator< HYP &> | run (Control ctl, Args... args) |
Set up the multiple threads and actually run, calling run_thread_generator_wrapper. More... | |
generator< HYP &> | unthreaded_run (Control ctl, Args... args) |
![]() | |
BaseNode (size_t n=0, this_t *p=nullptr, size_t i=0) | |
Constructor of basenode – sizes children to n. More... | |
BaseNode (const this_t &n) | |
BaseNode (this_t &&n) | |
void | operator= (const this_t &t) |
void | operator= (const this_t &&t) |
void | make_root () |
Make a node root – just nulls the parent. More... | |
virtual | ~BaseNode () |
virtual std::string | string (bool usedot=true) const |
virtual std::string | my_string () const |
virtual bool | operator== (const this_t &n) const |
NodeIterator | begin () const |
NodeIterator | end () const |
virtual bool | operator!= (const this_t &n) const |
void | reserve_children (const size_t n) |
decltype(children) & | get_children () |
decltype(children) const & | get_children () const |
this_t & | child (const size_t i) |
const this_t & | child (const size_t i) const |
template<typename... Args> | |
void | fill (size_t n, Args... args) |
size_t | nchildren () const |
this_t * | left_descend () const |
size_t | depth () const |
void | fix_child_info () |
void | check_child_info () const |
this_t & | operator[] (const size_t i) |
const this_t & | operator[] (const size_t i) const |
void | set_child (const size_t i, this_t &n) |
void | set_child (const size_t i, this_t &&n) |
void | push_back (this_t &n) |
void | push_back (this_t &&n) |
virtual bool | is_root () const |
Am I a root node? I am if my parent is nullptr. More... | |
this_t * | root () |
Find the root of this node by walking up the tree. More... | |
this_t * | get_via (std::function< bool(this_t &)> &f) |
Return a pointer to the first node satisfying predicate f, in standard traversal; nullptr otherwise. More... | |
virtual size_t | count () const |
How many nodes total are below me? More... | |
virtual size_t | count (const this_t &n) const |
How many nodes below me are equal to n? More... | |
virtual bool | is_terminal () const |
Am I a terminal? I am if I have no children. More... | |
virtual size_t | count_terminals () const |
virtual this_t * | get_nth (int n, std::function< int(const this_t &)> &f) |
virtual this_t * | get_nth (int n) |
template<typename T > | |
T | sum (std::function< T(const this_t &)> &f) const |
template<typename T > | |
T | sum (T(*f)(const this_t &)) const |
bool | all (std::function< bool(const this_t &)> &f) const |
void | map (const std::function< void(this_t &)> &f) |
void | show (size_t t=0) const |
![]() | |
bool | open |
SpinLock | mylock |
int | which_expansion |
std::atomic< unsigned int > | nvisits |
StreamingStatistics | statistics |
![]() | |
std::atomic< size_t > | index |
size_t | __nthreads |
std::atomic< size_t > | __nrunning |
ConcurrentQueueRing< HYP > | to_yield |
![]() | |
this_t * | parent |
size_t | pi |
![]() | |
static double | explore = 1.0 |
static data_t * | data = nullptr |
![]() | |
static NodeIterator | EndNodeIterator = NodeIterator(nullptr) |
![]() | |
std::vector< this_t > | children |