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 67 of file weight.hpp.

Member Typedef Documentation

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

Definition at line 70 of file weight.hpp.

Constructor & Destructor Documentation

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

Definition at line 72 of file weight.hpp.

Member Function Documentation

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

Definition at line 160 of file weight.hpp.

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

Definition at line 168 of file weight.hpp.

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

Definition at line 175 of file weight.hpp.

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

Definition at line 178 of file weight.hpp.

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

Definition at line 80 of file weight.hpp.

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

Definition at line 187 of file weight.hpp.

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

Definition at line 78 of file weight.hpp.

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

Definition at line 121 of file weight.hpp.

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

Definition at line 128 of file weight.hpp.

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

Definition at line 134 of file weight.hpp.

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

Definition at line 137 of file weight.hpp.

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

Definition at line 193 of file weight.hpp.

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

Definition at line 97 of file weight.hpp.

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

Definition at line 85 of file weight.hpp.

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

Definition at line 91 of file weight.hpp.

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

Definition at line 82 of file weight.hpp.

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

Definition at line 76 of file weight.hpp.

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

Definition at line 106 of file weight.hpp.

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

Definition at line 113 of file weight.hpp.

void vsmc::Weight::set_equal ( )
inline

Definition at line 99 of file weight.hpp.

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

Definition at line 145 of file weight.hpp.

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

Definition at line 152 of file weight.hpp.

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

Definition at line 74 of file weight.hpp.