VTK  9.3.0
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
27#ifndef vtkBoxMuellerRandomSequence_h
28#define vtkBoxMuellerRandomSequence_h
29
30#include "vtkCommonCoreModule.h" // For export macro
32
33VTK_ABI_NAMESPACE_BEGIN
34class VTKCOMMONCORE_EXPORT vtkBoxMuellerRandomSequence : public vtkGaussianRandomSequence
35{
36public:
38
43 void PrintSelf(ostream& os, vtkIndent indent) override;
45
50 void Initialize(vtkTypeUInt32 vtkNotUsed(seed)) override {}
51
55 double GetValue() override;
56
60 void Next() override;
61
66
71 void SetUniformSequence(vtkRandomSequence* uniformSequence);
72
73protected:
76
78 double Value;
79
80private:
82 void operator=(const vtkBoxMuellerRandomSequence&) = delete;
83};
84
85VTK_ABI_NAMESPACE_END
86#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.
~vtkBoxMuellerRandomSequence() override
void Next() override
Move to the next number in the random sequence.
vtkRandomSequence * GetUniformSequence()
Return the uniformly distributed sequence of random numbers.
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:38
Generate a sequence of random numbers.