vSMC  v3.0.0
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 RNGType >
size_type draw (RNGType &) const
 
double ess () const
 
template<typename InputIter >
void mul (InputIter)
 
template<typename RandomIter >
void mul (RandomIter, int)
 
template<typename OutputIter >
void read_weight (OutputIter) const
 
template<typename RandomIter >
void read_weight (RandomIter, int) const
 
void reserve (size_type)
 
void resize (size_type)
 
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)
 
void shrink_to_fit ()
 
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 space. This is primarily to be used in algorithms where weights are irrelevant or managed outside the sampler for any reason. Any attempt of using methods of this class will not result in compile time or runtime errors.

Definition at line 280 of file weight.hpp.

Member Typedef Documentation

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

Definition at line 283 of file weight.hpp.

Constructor & Destructor Documentation

vsmc::WeightNull::WeightNull ( size_type  )
inlineexplicit

Definition at line 285 of file weight.hpp.

Member Function Documentation

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

Definition at line 342 of file weight.hpp.

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

Definition at line 347 of file weight.hpp.

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

Definition at line 297 of file weight.hpp.

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

Definition at line 352 of file weight.hpp.

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

Definition at line 295 of file weight.hpp.

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

Definition at line 322 of file weight.hpp.

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

Definition at line 327 of file weight.hpp.

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

Definition at line 300 of file weight.hpp.

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

Definition at line 305 of file weight.hpp.

void vsmc::WeightNull::reserve ( size_type  )
inline

Definition at line 291 of file weight.hpp.

void vsmc::WeightNull::resize ( size_type  )
inline

Definition at line 289 of file weight.hpp.

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

Definition at line 312 of file weight.hpp.

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

Definition at line 317 of file weight.hpp.

void vsmc::WeightNull::set_equal ( )
inline

Definition at line 309 of file weight.hpp.

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

Definition at line 332 of file weight.hpp.

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

Definition at line 337 of file weight.hpp.

void vsmc::WeightNull::shrink_to_fit ( )
inline

Definition at line 293 of file weight.hpp.

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

Definition at line 287 of file weight.hpp.