vSMC
vSMC: Scalable Monte Carlo
Public Types | Public Member Functions | List of all members
vsmc::WeightNull Class Reference

An empty weight set class. More...

#include <vsmc/core/weight.hpp>

Public Types

using size_type = std::size_t
 

Public Member Functions

 WeightNull (size_type)
 
template<typename InputIter >
void add_log (InputIter)
 
template<typename RandomIter >
void add_log (RandomIter, int)
 
const double * data () const
 
template<typename URNG >
size_type draw (URNG &) const
 
double ess () const
 
template<typename InputIter >
void mul (InputIter)
 
template<typename RandomIter >
void mul (RandomIter, int)
 
void read_resample_weight (double *) const
 
template<typename OutputIter >
void read_weight (OutputIter) const
 
template<typename RandomIter >
void read_weight (RandomIter, int) const
 
const double * resample_data () const
 
size_type resample_size () const
 
template<typename InputIter >
void set (InputIter)
 
template<typename RandomIter >
void set (RandomIter, int)
 
void set_equal ()
 
template<typename InputIter >
void set_log (InputIter)
 
template<typename RandomIter >
void set_log (RandomIter, int)
 
size_type size () const
 

Detailed Description

An empty weight set class.

This class provides all the interfaces of Weight, while they do nothing at all and the class cost no memory usage. This is primarily to be used in algorithms where weights are irrelevant. Any attempt of using member functions of this class will not result in compile time or runtime errors, but the results might not be what one will be expecting.

Definition at line 239 of file weight.hpp.

Member Typedef Documentation

using vsmc::WeightNull::size_type = std::size_t

Definition at line 242 of file weight.hpp.

Constructor & Destructor Documentation

vsmc::WeightNull::WeightNull ( size_type  )
inlineexplicit

Definition at line 244 of file weight.hpp.

Member Function Documentation

template<typename InputIter >
void vsmc::WeightNull::add_log ( InputIter  )
inline

Definition at line 301 of file weight.hpp.

template<typename RandomIter >
void vsmc::WeightNull::add_log ( RandomIter  ,
int   
)
inline

Definition at line 306 of file weight.hpp.

const double* vsmc::WeightNull::data ( ) const
inline

Definition at line 254 of file weight.hpp.

template<typename URNG >
size_type vsmc::WeightNull::draw ( URNG &  ) const
inline

Definition at line 311 of file weight.hpp.

double vsmc::WeightNull::ess ( ) const
inline

Definition at line 250 of file weight.hpp.

template<typename InputIter >
void vsmc::WeightNull::mul ( InputIter  )
inline

Definition at line 281 of file weight.hpp.

template<typename RandomIter >
void vsmc::WeightNull::mul ( RandomIter  ,
int   
)
inline

Definition at line 286 of file weight.hpp.

void vsmc::WeightNull::read_resample_weight ( double *  ) const
inline

Definition at line 266 of file weight.hpp.

template<typename OutputIter >
void vsmc::WeightNull::read_weight ( OutputIter  ) const
inline

Definition at line 257 of file weight.hpp.

template<typename RandomIter >
void vsmc::WeightNull::read_weight ( RandomIter  ,
int   
) const
inline

Definition at line 262 of file weight.hpp.

const double* vsmc::WeightNull::resample_data ( ) const
inline

Definition at line 252 of file weight.hpp.

size_type vsmc::WeightNull::resample_size ( ) const
inline

Definition at line 248 of file weight.hpp.

template<typename InputIter >
void vsmc::WeightNull::set ( InputIter  )
inline

Definition at line 271 of file weight.hpp.

template<typename RandomIter >
void vsmc::WeightNull::set ( RandomIter  ,
int   
)
inline

Definition at line 276 of file weight.hpp.

void vsmc::WeightNull::set_equal ( )
inline

Definition at line 268 of file weight.hpp.

template<typename InputIter >
void vsmc::WeightNull::set_log ( InputIter  )
inline

Definition at line 291 of file weight.hpp.

template<typename RandomIter >
void vsmc::WeightNull::set_log ( RandomIter  ,
int   
)
inline

Definition at line 296 of file weight.hpp.

size_type vsmc::WeightNull::size ( ) const
inline

Definition at line 246 of file weight.hpp.