#include <Sampler.h>
Public Types | |
typedef std::shared_ptr< Sampler > | shared_ptr |
Public Member Functions | |
constructors | |
Sampler (const noiseModel::Diagonal::shared_ptr &model, uint_fast64_t seed=42u) | |
Sampler (const Vector &sigmas, uint_fast64_t seed=42u) | |
access functions | |
size_t | dim () const |
Vector | sigmas () const |
const noiseModel::Diagonal::shared_ptr & | model () const |
Protected Member Functions | |
Vector | sampleDiagonal (const Vector &sigmas) const |
Protected Attributes | |
std::mt19937_64 | generator_ |
noiseModel::Diagonal::shared_ptr | model_ |
basic functionality | |
Vector | sample () const |
sample from distribution More... | |
static Vector | sampleDiagonal (const Vector &sigmas, std::mt19937_64 *rng) |
sample with given random number generator More... | |
Sampling structure that keeps internal random number generators for diagonal distributions specified by NoiseModel
typedef std::shared_ptr<Sampler> gtsam::Sampler::shared_ptr |
|
explicit |
Create a sampler for the distribution specified by a diagonal NoiseModel with a manually specified seed
NOTE: do not use zero as a seed, it will break the generator
Definition at line 26 of file Sampler.cpp.
|
explicit |
Create a sampler for a distribution specified by a vector of sigmas directly
NOTE: do not use zero as a seed, it will break the generator
Definition at line 35 of file Sampler.cpp.
|
inline |
Vector gtsam::Sampler::sample | ( | ) | const |
sample from distribution
Definition at line 62 of file Sampler.cpp.
given sigmas for a diagonal model, returns a sample
Definition at line 57 of file Sampler.cpp.
sample with given random number generator
Definition at line 39 of file Sampler.cpp.
|
mutableprotected |
|
protected |
noiseModel created at generation