VTK  9.3.0
vtkMinimalStandardRandomSequence.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
39#ifndef vtkMinimalStandardRandomSequence_h
40#define vtkMinimalStandardRandomSequence_h
41
42#include "vtkCommonCoreModule.h" // For export macro
43#include "vtkRandomSequence.h"
44
45VTK_ABI_NAMESPACE_BEGIN
46class VTKCOMMONCORE_EXPORT vtkMinimalStandardRandomSequence : public vtkRandomSequence
47{
48public:
50
55 void PrintSelf(ostream& os, vtkIndent indent) override;
57
62 void Initialize(vtkTypeUInt32 seed) override { this->SetSeed(seed); }
63
78 void SetSeed(int value);
79
91 void SetSeedOnly(int value);
92
97 int GetSeed();
98
103 double GetValue() override;
104
108 void Next() override;
109
122 virtual double GetRangeValue(double rangeMin, double rangeMax);
123
129 double GetNextRangeValue(double rangeMin, double rangeMax);
130
131protected:
134
135 int Seed;
136
137private:
139 void operator=(const vtkMinimalStandardRandomSequence&) = delete;
140};
141
142VTK_ABI_NAMESPACE_END
143#endif // #ifndef vtkMinimalStandardRandomSequence_h
a simple class to control print indentation
Definition vtkIndent.h:38
Park and Miller Sequence of pseudo random numbers.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiation, type information, and printing.
void Initialize(vtkTypeUInt32 seed) override
Satisfy general API of vtkRandomSequence superclass.
double GetNextRangeValue(double rangeMin, double rangeMax)
Get the next value in the sequence within a range.
double GetValue() override
Current value.
void Next() override
Move to the next number in the random sequence.
static vtkMinimalStandardRandomSequence * New()
Standard methods for instantiation, type information, and printing.
virtual double GetRangeValue(double rangeMin, double rangeMax)
Convenient method to return a value in a specific range from the range [0,1.
void SetSeed(int value)
Set the seed of the random sequence.
int GetSeed()
Get the seed of the random sequence.
void SetSeedOnly(int value)
Set the seed of the random sequence.
Generate a sequence of random numbers.