VTK  9.1.0
vtkMinimalStandardRandomSequence.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkMinimalStandardRandomSequence.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13=========================================================================*/
44#ifndef vtkMinimalStandardRandomSequence_h
45#define vtkMinimalStandardRandomSequence_h
46
47#include "vtkCommonCoreModule.h" // For export macro
48#include "vtkRandomSequence.h"
49
50class VTKCOMMONCORE_EXPORT vtkMinimalStandardRandomSequence : public vtkRandomSequence
51{
52public:
54
59 void PrintSelf(ostream& os, vtkIndent indent) override;
61
66 void Initialize(vtkTypeUInt32 seed) override { this->SetSeed(seed); }
67
82 void SetSeed(int value);
83
95 void SetSeedOnly(int value);
96
101 int GetSeed();
102
107 double GetValue() override;
108
112 void Next() override;
113
126 virtual double GetRangeValue(double rangeMin, double rangeMax);
127
133 double GetNextRangeValue(double rangeMin, double rangeMax);
134
135protected:
138
139 int Seed;
140
141private:
143 void operator=(const vtkMinimalStandardRandomSequence&) = delete;
144};
145
146#endif // #ifndef vtkMinimalStandardRandomSequence_h
a simple class to control print indentation
Definition: vtkIndent.h:43
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.
@ value
Definition: vtkX3D.h:226