Fleet  0.0.9
Inference in the LOT
Public Member Functions | List of all members
PartitionMCMC< HYP > Class Template Reference

#include <PartitionMCMC.h>

Inheritance diagram for PartitionMCMC< HYP >:
Inheritance graph
[legend]
Collaboration diagram for PartitionMCMC< HYP >:
Collaboration graph
[legend]

Public Member Functions

 PartitionMCMC (HYP &h0, size_t max_depth, typename HYP::data_t *data, size_t max_size=0)
 This specifies both a max_Size and a max_depth which are the most partitions we'll make. If max_size=0 then we ignore it. More...
 
- Public Member Functions inherited from ChainPool< HYP >
 ChainPool ()
 
 ChainPool (HYP &h0, typename HYP::data_t *d, size_t n)
 
void set_data (typename HYP::data_t *d, bool recompute=true)
 Set this data. More...
 
void add_chain (ARGS... args)
 Lock and modify the pool. More...
 
size_t nchains () const
 
void show (std::string prefix) const
 
generator< HYP &> run_thread (Control &ctl) override
 This run helper is called internally by multiple different threads, and runs a given pool. More...
 
- Public Member Functions inherited from ThreadedInferenceInterface< HYP >
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)
 

Additional Inherited Members

- Public Types inherited from ChainPool< HYP >
enum  RunningState
 
- Public Attributes inherited from ChainPool< HYP >
std::vector< MCMCChain< HYP > > pool
 
unsigned long steps_before_change
 
std::vector< RunningStaterunning
 
OrderedLock running_lock
 
- Public Attributes inherited from ThreadedInferenceInterface< HYP >
std::atomic< size_t > index
 
size_t __nthreads
 
std::atomic< size_t > __nrunning
 
ConcurrentQueueRing< HYP > to_yield
 

Detailed Description

template<typename HYP>
class PartitionMCMC< HYP >

Author
Steven Piantadosi
Date
26/12/20

Constructor & Destructor Documentation

◆ PartitionMCMC()

template<typename HYP >
PartitionMCMC< HYP >::PartitionMCMC ( HYP &  h0,
size_t  max_depth,
typename HYP::data_t *  data,
size_t  max_size = 0 
)
inline

This specifies both a max_Size and a max_depth which are the most partitions we'll make. If max_size=0 then we ignore it.

Parameters
h0
max_depth
data
max_size

The documentation for this class was generated from the following file: