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
30#ifndef vtkMinimalStandardRandomSequence_h
31#define vtkMinimalStandardRandomSequence_h
32
33#include "vtkCommonCoreModule.h" // For export macro
34#include "vtkRandomSequence.h"
35
36VTK_ABI_NAMESPACE_BEGIN
37class VTKCOMMONCORE_EXPORT vtkMinimalStandardRandomSequence : public vtkRandomSequence
38{
39public:
41
46 void PrintSelf(ostream& os, vtkIndent indent) override;
48
53 void Initialize(vtkTypeUInt32 seed) override { this->SetSeed(seed); }
54
69 void SetSeed(int value);
70
82 void SetSeedOnly(int value);
83
88 int GetSeed();
89
94 double GetValue() override;
95
99 void Next() override;
100
113 virtual double GetRangeValue(double rangeMin, double rangeMax);
114
120 double GetNextRangeValue(double rangeMin, double rangeMax);
121
122protected:
125
126 int Seed;
127
128private:
130 void operator=(const vtkMinimalStandardRandomSequence&) = delete;
131};
132
133VTK_ABI_NAMESPACE_END
134#endif // #ifndef vtkMinimalStandardRandomSequence_h
a simple class to control print indentation
Definition vtkIndent.h:29
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.