vSMC
vSMC: Scalable Monte Carlo
|
Record and trace resample index. More...
#include <vsmc/resample/index.hpp>
Public Types | |
using | index_type = IntType |
using | size_type = std::size_t |
Public Member Functions | |
ResampleIndex (size_type N) | |
void | clear () |
Release memory. More... | |
index_type | index (size_type id, std::size_t iter) const |
Get the index given the particle ID and iteration number, starting with zero. More... | |
template<MatrixOrder Order> | |
Vector< index_type > | index_matrix () const |
void | insert () |
template<typename InputIter > | |
void | insert (InputIter first) |
template<typename InputIter > | |
void | insert (std::size_t iter, InputIter first) |
std::size_t | iter_size () const |
Number of iterations recorded. More... | |
void | push_back () |
template<typename InputIter > | |
void | push_back (InputIter first) |
template<MatrixOrder Order, typename OutputIter > | |
void | read_index_matrix (OutputIter first) const |
void | reset () |
Reset history. More... | |
size_type | size () const |
Record and trace resample index.
using vsmc::ResampleIndex< IntType >::index_type = IntType |
using vsmc::ResampleIndex< IntType >::size_type = std::size_t |
|
inline |
|
inline |
|
inline |
Get the index given the particle ID and iteration number, starting with zero.
The index is traced back using the history. The cost is O(iter_size() - iter)
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |