VTK  9.3.20231204
vtkBoxMuellerRandomSequence.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
47 #ifndef vtkBoxMuellerRandomSequence_h
48 #define vtkBoxMuellerRandomSequence_h
49 
50 #include "vtkCommonCoreModule.h" // For export macro
52 
53 VTK_ABI_NAMESPACE_BEGIN
54 class VTKCOMMONCORE_EXPORT vtkBoxMuellerRandomSequence : public vtkGaussianRandomSequence
55 {
56 public:
58 
63  void PrintSelf(ostream& os, vtkIndent indent) override;
65 
70  void Initialize(vtkTypeUInt32 vtkNotUsed(seed)) override {}
71 
75  double GetValue() override;
76 
80  void Next() override;
81 
86 
91  void SetUniformSequence(vtkRandomSequence* uniformSequence);
92 
93 protected:
96 
98  double Value;
99 
100 private:
102  void operator=(const vtkBoxMuellerRandomSequence&) = delete;
103 };
104 
105 VTK_ABI_NAMESPACE_END
106 #endif // #ifndef vtkBoxMuellerRandomSequence_h
Gaussian sequence of pseudo random numbers implemented with the Box-Mueller transform.
void SetUniformSequence(vtkRandomSequence *uniformSequence)
Set the uniformly distributed sequence of random numbers.
static vtkBoxMuellerRandomSequence * New()
Standard methods for instantiation, type information, and printing.
vtkRandomSequence * GetUniformSequence()
Return the uniformly distributed sequence of random numbers.
~vtkBoxMuellerRandomSequence() override
void Next() override
Move to the next number in the random sequence.
double GetValue() override
Current value.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiation, type information, and printing.
void Initialize(vtkTypeUInt32 vtkNotUsed(seed)) override
Satisfy general API of vtkRandomSequence superclass.
Gaussian sequence of pseudo random numbers.
a simple class to control print indentation
Definition: vtkIndent.h:108
Generate a sequence of random numbers.