GNU Radio 3.6.5 C++ API
|
Random number source. More...
#include <gr_fastnoise_source_i.h>
Public Member Functions | |
void | set_type (gr_noise_type_t type) |
void | set_amplitude (float ampl) |
void | generate () |
gr_noise_type_t | type () const |
float | amplitude () const |
virtual int | work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) |
just like gr_block::general_work, only this arranges to call consume_each for you | |
Friends | |
GR_CORE_API gr_fastnoise_source_i_sptr | gr_make_fastnoise_source_i (gr_noise_type_t type, float ampl, long seed, long samples) |
Make a noise source. |
Random number source.
Generate random values from different distributions. Currently, only Gaussian and uniform are enabled.
type | the random distribution to use (see gr_noise_type.h) |
ampl | a scaling factor for the output |
seed | seed for random generators. Note that for uniform and Gaussian distributions, this should be a negative number. |
samples | number of samples to pre-generate. |
float gr_fastnoise_source_i::amplitude | ( | ) | const [inline] |
void gr_fastnoise_source_i::generate | ( | ) |
void gr_fastnoise_source_i::set_amplitude | ( | float | ampl | ) | [inline] |
void gr_fastnoise_source_i::set_type | ( | gr_noise_type_t | type | ) | [inline] |
gr_noise_type_t gr_fastnoise_source_i::type | ( | ) | const [inline] |
virtual int gr_fastnoise_source_i::work | ( | int | noutput_items, |
gr_vector_const_void_star & | input_items, | ||
gr_vector_void_star & | output_items | ||
) | [virtual] |
just like gr_block::general_work, only this arranges to call consume_each for you
The user must override work to define the signal processing code
Implements gr_sync_block.
GR_CORE_API gr_fastnoise_source_i_sptr gr_make_fastnoise_source_i | ( | gr_noise_type_t | type, |
float | ampl, | ||
long | seed, | ||
long | samples | ||
) | [friend] |
Make a noise source.
type | the random distribution to use (see gr_noise_type.h) |
ampl | a scaling factor for the output |
seed | seed for random generators. Note that for uniform and Gaussian distributions, this should be a negative number. |
samples | number of samples to pre-generate. |