diff options
author | Tom Rondeau | 2012-03-13 11:57:00 -0400 |
---|---|---|
committer | Tom Rondeau | 2012-03-13 11:57:00 -0400 |
commit | 0d6871b3aaa175ed20061543ded6d9f8b4dcbc61 (patch) | |
tree | 2dcdc311a18ec93d374dfd05fee876ae1b5af3ee /gnuradio-core | |
parent | c50cdd6e1f8d4555728b23af9a60f5ec8590ca75 (diff) | |
download | gnuradio-0d6871b3aaa175ed20061543ded6d9f8b4dcbc61.tar.gz gnuradio-0d6871b3aaa175ed20061543ded6d9f8b4dcbc61.tar.bz2 gnuradio-0d6871b3aaa175ed20061543ded6d9f8b4dcbc61.zip |
core: updated the documentation for the noise source to explain the seed better.
Also changed the default seed to 0. Since the current distributions enabled only change with negative seeds, this causes no change in the behavior of these sources, but will hopefully not mislead users with the use of a positive number.
Diffstat (limited to 'gnuradio-core')
-rw-r--r-- | gnuradio-core/src/lib/gengen/gr_noise_source_X.h.t | 22 | ||||
-rw-r--r-- | gnuradio-core/src/lib/gengen/gr_noise_source_X.i.t | 4 |
2 files changed, 21 insertions, 5 deletions
diff --git a/gnuradio-core/src/lib/gengen/gr_noise_source_X.h.t b/gnuradio-core/src/lib/gengen/gr_noise_source_X.h.t index ab5992257..196501c4d 100644 --- a/gnuradio-core/src/lib/gengen/gr_noise_source_X.h.t +++ b/gnuradio-core/src/lib/gengen/gr_noise_source_X.h.t @@ -34,22 +34,38 @@ class @NAME@; typedef boost::shared_ptr<@NAME@> @NAME@_sptr; +/*! \brief Make a noise source + * \param type the random distribution to use (see gr_noise_type.h) + * \param ampl a scaling factor for the output + * \param seed seed for random generators. Note that for uniform and + * Gaussian distributions, this should be a negative number. + */ GR_CORE_API @NAME@_sptr -gr_make_@BASE_NAME@ (gr_noise_type_t type, float ampl, long seed = 3021); +gr_make_@BASE_NAME@ (gr_noise_type_t type, float ampl, long seed = 0); /*! - * \brief random number source + * \brief Random number source * \ingroup source_blk + * + * \details + * Generate random values from different distributions. + * Currently, only Gaussian and uniform are enabled. + * + * \param type the random distribution to use (see gr_noise_type.h) + * \param ampl a scaling factor for the output + * \param seed seed for random generators. Note that for uniform and + * Gaussian distributions, this should be a negative number. */ class GR_CORE_API @NAME@ : public gr_sync_block { friend GR_CORE_API @NAME@_sptr + gr_make_@BASE_NAME@ (gr_noise_type_t type, float ampl, long seed); gr_noise_type_t d_type; float d_ampl; gr_random d_rng; - @NAME@ (gr_noise_type_t type, float ampl, long seed = 3021); + @NAME@ (gr_noise_type_t type, float ampl, long seed = 0); public: void set_type (gr_noise_type_t type) { d_type = type; } diff --git a/gnuradio-core/src/lib/gengen/gr_noise_source_X.i.t b/gnuradio-core/src/lib/gengen/gr_noise_source_X.i.t index 179dc0343..36a51f31a 100644 --- a/gnuradio-core/src/lib/gengen/gr_noise_source_X.i.t +++ b/gnuradio-core/src/lib/gengen/gr_noise_source_X.i.t @@ -25,11 +25,11 @@ GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@); @NAME@_sptr -gr_make_@BASE_NAME@ (gr_noise_type_t type, float ampl, long seed = 3021); +gr_make_@BASE_NAME@ (gr_noise_type_t type, float ampl, long seed = 0); class @NAME@ : public gr_block { private: - @NAME@ (gr_noise_type_t type, float ampl, long seed = 3021); + @NAME@ (gr_noise_type_t type, float ampl, long seed = 0); public: void set_type (gr_noise_type_t type) { d_type = type; } |