vSMC  v3.0.0
Scalable Monte Carlo
Public Types | Public Member Functions | Static Public Member Functions | List of all members
vsmc::ResampleEval< T > Class Template Reference

Sampler<T>::eval_type subtype. More...

#include <vsmc/resample/algorithm.hpp>

Public Types

using eval_type = std::function< void(std::size_t, std::size_t, typename Particle< T >::rng_type &, const double *, typename Particle< T >::size_type *)>
 

Public Member Functions

 ResampleEval (const eval_type &eval)
 Construct a Sampler::move_type object. More...
 
std::size_t operator() (std::size_t, Particle< T > &particle) const
 Returns how many particles having non-zero replication number. More...
 
void set_eval (const eval_type &new_eval)
 Set a new evaluation object of type eval_type. More...
 

Static Public Member Functions

static constexpr double always ()
 
static constexpr double never ()
 

Detailed Description

template<typename T>
class vsmc::ResampleEval< T >

Sampler<T>::eval_type subtype.

Definition at line 106 of file algorithm.hpp.

Member Typedef Documentation

template<typename T >
using vsmc::ResampleEval< T >::eval_type = std::function<void(std::size_t, std::size_t, typename Particle<T>::rng_type &, const double *, typename Particle<T>::size_type *)>

Definition at line 111 of file algorithm.hpp.

Constructor & Destructor Documentation

template<typename T >
vsmc::ResampleEval< T >::ResampleEval ( const eval_type eval)
inlineexplicit

Construct a Sampler::move_type object.

Parameters
evalA resampling algorithm evaluation object, see interface of ResampleAlgorithm

Definition at line 117 of file algorithm.hpp.

Member Function Documentation

template<typename T >
static constexpr double vsmc::ResampleEval< T >::always ( )
inlinestatic

Definition at line 119 of file algorithm.hpp.

template<typename T >
static constexpr double vsmc::ResampleEval< T >::never ( )
inlinestatic

Definition at line 124 of file algorithm.hpp.

template<typename T >
std::size_t vsmc::ResampleEval< T >::operator() ( std::size_t  ,
Particle< T > &  particle 
) const
inline

Returns how many particles having non-zero replication number.

Definition at line 133 of file algorithm.hpp.

template<typename T >
void vsmc::ResampleEval< T >::set_eval ( const eval_type new_eval)
inline

Set a new evaluation object of type eval_type.

Definition at line 130 of file algorithm.hpp.