gtsam 4.1.1
gtsam
|
Sampling structure that keeps internal random number generators for diagonal distributions specified by NoiseModel.
Public Member Functions | |
constructors | |
Sampler (const noiseModel::Diagonal::shared_ptr &model, uint_fast64_t seed=42u) | |
Create a sampler for the distribution specified by a diagonal NoiseModel with a manually specified seed. More... | |
Sampler (const Vector &sigmas, uint_fast64_t seed=42u) | |
Create a sampler for a distribution specified by a vector of sigmas directly. More... | |
access functions | |
size_t | dim () const |
Vector | sigmas () const |
const noiseModel::Diagonal::shared_ptr & | model () const |
basic functionality | |
Vector | sample () const |
sample from distribution | |
Public Types | |
typedef boost::shared_ptr< Sampler > | shared_ptr |
Protected Member Functions | |
Vector | sampleDiagonal (const Vector &sigmas) const |
given sigmas for a diagonal model, returns a sample | |
Protected Attributes | |
noiseModel::Diagonal::shared_ptr | model_ |
noiseModel created at generation | |
std::mt19937_64 | generator_ |
generator | |
|
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
|
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