VTK  9.4.20241221
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
139#ifndef vtkMinimalStandardRandomSequence_h
140#define vtkMinimalStandardRandomSequence_h
141
142#include "vtkCommonCoreModule.h" // For export macro
143#include "vtkRandomSequence.h"
144
145VTK_ABI_NAMESPACE_BEGIN
146class VTKCOMMONCORE_EXPORT vtkMinimalStandardRandomSequence : public vtkRandomSequence
147{
148public:
150
155 void PrintSelf(ostream& os, vtkIndent indent) override;
157
162 void Initialize(vtkTypeUInt32 seed) override { this->SetSeed(seed); }
163
178 void SetSeed(int value);
179
191 void SetSeedOnly(int value);
192
197 int GetSeed();
198
203 double GetValue() override;
204
208 void Next() override;
209
222 virtual double GetRangeValue(double rangeMin, double rangeMax);
223
229 double GetNextRangeValue(double rangeMin, double rangeMax);
230
231protected:
234
235 int Seed;
236
237private:
239 void operator=(const vtkMinimalStandardRandomSequence&) = delete;
240};
241
242VTK_ABI_NAMESPACE_END
243#endif // #ifndef vtkMinimalStandardRandomSequence_h
a simple class to control print indentation
Definition vtkIndent.h:108
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.