Changed argument to obviate need for cast
parent
054e9f19c0
commit
218cb5537b
|
|
@ -20,16 +20,16 @@
|
||||||
namespace gtsam {
|
namespace gtsam {
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
Sampler::Sampler(const noiseModel::Diagonal::shared_ptr& model, int32_t seed)
|
Sampler::Sampler(const noiseModel::Diagonal::shared_ptr& model,
|
||||||
: model_(model), generator_(static_cast<unsigned>(seed)) {}
|
uint_fast64_t seed)
|
||||||
|
: model_(model), generator_(seed) {}
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
Sampler::Sampler(const Vector& sigmas, int32_t seed)
|
Sampler::Sampler(const Vector& sigmas, uint_fast64_t seed)
|
||||||
: model_(noiseModel::Diagonal::Sigmas(sigmas, true)),
|
: model_(noiseModel::Diagonal::Sigmas(sigmas, true)), generator_(seed) {}
|
||||||
generator_(static_cast<unsigned>(seed)) {}
|
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
Sampler::Sampler(int32_t seed) : generator_(static_cast<unsigned>(seed)) {}
|
Sampler::Sampler(uint_fast64_t seed) : generator_(seed) {}
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
Vector Sampler::sampleDiagonal(const Vector& sigmas) const {
|
Vector Sampler::sampleDiagonal(const Vector& sigmas) const {
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ class GTSAM_EXPORT Sampler {
|
||||||
* NOTE: do not use zero as a seed, it will break the generator
|
* NOTE: do not use zero as a seed, it will break the generator
|
||||||
*/
|
*/
|
||||||
explicit Sampler(const noiseModel::Diagonal::shared_ptr& model,
|
explicit Sampler(const noiseModel::Diagonal::shared_ptr& model,
|
||||||
int32_t seed = 42u);
|
uint_fast64_t seed = 42u);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a sampler for a distribution specified by a vector of sigmas
|
* Create a sampler for a distribution specified by a vector of sigmas
|
||||||
|
|
@ -57,7 +57,7 @@ class GTSAM_EXPORT Sampler {
|
||||||
*
|
*
|
||||||
* NOTE: do not use zero as a seed, it will break the generator
|
* NOTE: do not use zero as a seed, it will break the generator
|
||||||
*/
|
*/
|
||||||
explicit Sampler(const Vector& sigmas, int32_t seed = 42u);
|
explicit Sampler(const Vector& sigmas, uint_fast64_t seed = 42u);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
/// @name access functions
|
/// @name access functions
|
||||||
|
|
@ -87,7 +87,7 @@ class GTSAM_EXPORT Sampler {
|
||||||
#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V4
|
#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V4
|
||||||
/// @name Deprecated
|
/// @name Deprecated
|
||||||
/// @{
|
/// @{
|
||||||
explicit Sampler(int32_t seed = 42u);
|
explicit Sampler(uint_fast64_t seed = 42u);
|
||||||
Vector sampleNewModel(const noiseModel::Diagonal::shared_ptr& model) const;
|
Vector sampleNewModel(const noiseModel::Diagonal::shared_ptr& model) const;
|
||||||
/// @}
|
/// @}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue