vSMC
v3.0.0
Scalable Monte Carlo
|
Particle class representing the whole particle set. More...
#include <vsmc/core/particle.hpp>
Public Types | |
using | range_type = ParticleRange< T > |
using | rng_set_type = RNGSetType< T > |
using | rng_type = typename rng_set_type::rng_type |
using | size_type = SizeType< T > |
using | sp_type = SingleParticle< T > |
using | state_type = T |
using | weight_type = WeightType< T > |
Public Member Functions | |
Particle () | |
template<typename... Args> | |
Particle (size_type N, Args &&...args) | |
sp_type | begin () |
Get a SingleParticle<T> object for the first particle. More... | |
Particle< T > | clone () const |
Clone the Particle except the RNG engines. More... | |
sp_type | end () |
Get a SingleParticle<T> object for the first particle. More... | |
range_type | range (size_type begin, size_type end) |
Get a ParticleRange<T> object. More... | |
range_type | range () |
Get a ParticleRange<T> object with begin == 0 , end == size() More... | |
template<typename InputIter > | |
void | resize_by_index (size_type N, InputIter index) |
Resize by selecting according to user supplied index vector. More... | |
template<typename ResampleType > | |
void | resize_by_resample (size_type N, ResampleType &&op) |
Resize by resampling. More... | |
void | resize_by_uniform (size_type N) |
Resize by uniformly selecting from all particles. More... | |
rng_type & | rng (size_type id) |
Get an (parallel) RNG stream for a given particle. More... | |
const rng_type & | rng (size_type id) const |
Get an (parallel) RNG stream for a given particle. More... | |
rng_type & | rng () |
Get the (sequential) RNG used stream for resampling. More... | |
const rng_type & | rng () const |
Get the (sequential) RNG used stream for resampling. More... | |
rng_set_type & | rng_set () |
Read and write access to the RNG collection object. More... | |
const rng_set_type & | rng_set () const |
Read only access to the RNG collection object. More... | |
size_type | size () const |
Number of particles. More... | |
sp_type | sp (size_type id) |
Get a SingleParticle<T> object. More... | |
state_type & | state () |
Read and write access to the state collection object. More... | |
const state_type & | state () const |
Read only access to the state collection object. More... | |
weight_type & | weight () |
Read and write access to the weight collection object. More... | |
const weight_type & | weight () const |
Read only access to the weight collection object. More... | |
Particle class representing the whole particle set.
Definition at line 83 of file particle.hpp.
using vsmc::Particle< T >::range_type = ParticleRange<T> |
Definition at line 92 of file particle.hpp.
using vsmc::Particle< T >::rng_set_type = RNGSetType<T> |
Definition at line 89 of file particle.hpp.
using vsmc::Particle< T >::rng_type = typename rng_set_type::rng_type |
Definition at line 90 of file particle.hpp.
using vsmc::Particle< T >::size_type = SizeType<T> |
Definition at line 86 of file particle.hpp.
using vsmc::Particle< T >::sp_type = SingleParticle<T> |
Definition at line 91 of file particle.hpp.
using vsmc::Particle< T >::state_type = T |
Definition at line 87 of file particle.hpp.
using vsmc::Particle< T >::weight_type = WeightType<T> |
Definition at line 88 of file particle.hpp.
|
inline |
Definition at line 94 of file particle.hpp.
|
inlineexplicit |
Definition at line 100 of file particle.hpp.
|
inline |
Get a SingleParticle<T> object for the first particle.
Definition at line 216 of file particle.hpp.
|
inline |
Clone the Particle except the RNG engines.
Definition at line 110 of file particle.hpp.
|
inline |
Get a SingleParticle<T> object for the first particle.
Definition at line 219 of file particle.hpp.
|
inline |
Get a ParticleRange<T> object.
Definition at line 207 of file particle.hpp.
|
inline |
Get a ParticleRange<T> object with begin == 0
, end == size()
Definition at line 213 of file particle.hpp.
|
inline |
Resize by selecting according to user supplied index vector.
N | The new sample size |
index | N-vector of parent indices |
Definition at line 127 of file particle.hpp.
|
inline |
Resize by resampling.
N | The new sample size |
op | The resampling function object |
The particle system is resampled to a new system with possibly different size. The system will be changed even if N == size()
.
Definition at line 142 of file particle.hpp.
|
inline |
Resize by uniformly selecting from all particles.
N | The new sample size |
This is equivalent to first set the weights to equal, and then perform Multinomial resampling. The particle system will be changed even if N == size()
.
Definition at line 161 of file particle.hpp.
|
inline |
Get an (parallel) RNG stream for a given particle.
Definition at line 186 of file particle.hpp.
|
inline |
Get an (parallel) RNG stream for a given particle.
Definition at line 192 of file particle.hpp.
|
inline |
Get the (sequential) RNG used stream for resampling.
Definition at line 198 of file particle.hpp.
|
inline |
Get the (sequential) RNG used stream for resampling.
Definition at line 201 of file particle.hpp.
|
inline |
Read and write access to the RNG collection object.
Definition at line 180 of file particle.hpp.
|
inline |
Read only access to the RNG collection object.
Definition at line 183 of file particle.hpp.
|
inline |
Number of particles.
Definition at line 120 of file particle.hpp.
|
inline |
Get a SingleParticle<T> object.
Definition at line 204 of file particle.hpp.
|
inline |
Read and write access to the state collection object.
Definition at line 168 of file particle.hpp.
|
inline |
Read only access to the state collection object.
Definition at line 171 of file particle.hpp.
|
inline |
Read and write access to the weight collection object.
Definition at line 174 of file particle.hpp.
|
inline |
Read only access to the weight collection object.
Definition at line 177 of file particle.hpp.