Helios++
Helios software for LiDAR simulations
|
Abstract class for random noise handling. More...
#include <RandomNoiseSource.h>
Public Member Functions | |
RandomNoiseSource (RandomnessGenerator< RealType > const &rg) | |
Create a RandomNoiseSource using received RandomnessGenerator. More... | |
RandomNoiseSource (std::string const &seed) | |
Create a RandomNoiseSource using received seed. More... | |
RandomNoiseSource () | |
Create a RandomNoiseSource using default RandomnessGenerator. | |
virtual std::string | getRandomNoiseType ()=0 |
Obtain the random noise type. More... | |
![]() | |
void | build () |
Common behavior for all NoiseSource constructors. | |
double | getClipMin () |
Obtain the clip min value. More... | |
NoiseSource & | setClipMin (RealType clipMin) |
Set the clip min value. More... | |
double | getClipMax () |
Obtain the clip max value. More... | |
NoiseSource & | setClipMax (RealType clipMax) |
Set the clip max value. More... | |
bool | isClipEnabled () |
Check if clipping is enabled or not. More... | |
NoiseSource & | setClipEnabled (bool clipEnabled) |
Enable clipping by setting it to true or disable it by setting to false. More... | |
bool | isFixedValueEnabled () |
Check if fixed value usage is enabled or not. More... | |
unsigned long | getFixedLifespan () |
Obtain the fixed value lifespan. More... | |
NoiseSource & | setFixedLifespan (unsigned long fixedLifespan) |
Set the fixed value lifespan. More... | |
unsigned long | getFixedValueRemainingUses () |
Obtain the remaining uses of current fixed value. More... | |
NoiseSource & | setFixedValueRemainingUses (unsigned long remainingUses) |
Update remaining uses count for current fixed value. More... | |
NoiseSource & | fixedRenew () |
Forces a renewal of fixed value and its remaining uses. More... | |
RealType | next () |
Obtain the next default noise value. More... | |
virtual RealType | noiseFunction ()=0 |
Function which computes noise values. More... | |
Protected Attributes | |
RandomnessGenerator< RealType > | rg |
RandomnessGenerator to be used to generate random noise. | |
![]() | |
RealType | clipMin = 0.0 |
All noise values which are less than clipMin will be clipped to clipMin if clipping is enabled. More... | |
RealType | clipMax = 1.0 |
All noise values which are greater than clipMax will be clipped to clipMaxx if clipping is enabled. | |
bool | clipEnabled = false |
True when clipping is enabled, False otherwise. | |
unsigned long | fixedLifespan = 1L |
Specify the how many times a fixed value can be used before being renewed. More... | |
unsigned long | fixedRemainingUses = 0L |
How many remaining uses the fixed value has. More... | |
RealType | fixedValue = 0 |
The fixed value. More... | |
Friends | |
template<typename _RealType > | |
std::ostream & | operator<< (std::ostream &out, RandomNoiseSource< _RealType > &ns) |
Output stream behavior. | |
Additional Inherited Members | |
![]() | |
RealType | clip (RealType v) |
If clipping is enabled, it will clip received value. If clipping is not enabled, received value will not be clipped. More... | |
Abstract class for random noise handling.
RealType | Type for the noise. |
|
inlineexplicit |
Create a RandomNoiseSource using received RandomnessGenerator.
rg | RandomnessGenerator used to generate noise |
|
inlineexplicit |
Create a RandomNoiseSource using received seed.
seed | Seed to build the RandomnessGenerator |
|
pure virtual |
Obtain the random noise type.
Implemented in UniformNoiseSource< RealType >, UniformNoiseSource< double >, and NormalNoiseSource< RealType >.