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

Weight class. More...

#include <vsmc/core/weight.hpp>

Public Types

using size_type = std::size_t
 

Public Member Functions

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

Protected Member Functions

double * mutable_data ()
 

Detailed Description

Weight class.

Definition at line 66 of file weight.hpp.

Member Typedef Documentation

using vsmc::Weight::size_type = std::size_t

Definition at line 69 of file weight.hpp.

Constructor & Destructor Documentation

vsmc::Weight::Weight ( size_type  N)
inlineexplicit

Definition at line 71 of file weight.hpp.

Member Function Documentation

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

Definition at line 159 of file weight.hpp.

void vsmc::Weight::add_log ( const double *  first)
inline

Definition at line 167 of file weight.hpp.

void vsmc::Weight::add_log ( double *  first)
inline

Definition at line 174 of file weight.hpp.

template<typename RandomIter >
void vsmc::Weight::add_log ( RandomIter  first,
int  stride 
)
inline

Definition at line 177 of file weight.hpp.

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

Definition at line 79 of file weight.hpp.

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

Definition at line 186 of file weight.hpp.

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

Definition at line 77 of file weight.hpp.

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

Definition at line 120 of file weight.hpp.

void vsmc::Weight::mul ( const double *  first)
inline

Definition at line 127 of file weight.hpp.

void vsmc::Weight::mul ( double *  first)
inline

Definition at line 133 of file weight.hpp.

template<typename RandomIter >
void vsmc::Weight::mul ( RandomIter  first,
int  stride 
)
inline

Definition at line 136 of file weight.hpp.

double* vsmc::Weight::mutable_data ( )
inlineprotected

Definition at line 192 of file weight.hpp.

void vsmc::Weight::read_resample_weight ( double *  first) const
inline

Definition at line 96 of file weight.hpp.

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

Definition at line 84 of file weight.hpp.

template<typename RandomIter >
void vsmc::Weight::read_weight ( RandomIter  first,
int  stride 
) const
inline

Definition at line 90 of file weight.hpp.

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

Definition at line 81 of file weight.hpp.

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

Definition at line 75 of file weight.hpp.

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

Definition at line 105 of file weight.hpp.

template<typename RandomIter >
void vsmc::Weight::set ( RandomIter  first,
int  stride 
)
inline

Definition at line 112 of file weight.hpp.

void vsmc::Weight::set_equal ( )
inline

Definition at line 98 of file weight.hpp.

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

Definition at line 144 of file weight.hpp.

template<typename RandomIter >
void vsmc::Weight::set_log ( RandomIter  first,
int  stride 
)
inline

Definition at line 151 of file weight.hpp.

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

Definition at line 73 of file weight.hpp.