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 =========================================================================*/
144 #ifndef vtkMinimalStandardRandomSequence_h
145 #define vtkMinimalStandardRandomSequence_h
146 
147 #include "vtkCommonCoreModule.h" // For export macro
148 #include "vtkRandomSequence.h"
149 
150 class VTKCOMMONCORE_EXPORT vtkMinimalStandardRandomSequence : public vtkRandomSequence
151 {
152 public:
154 
159  void PrintSelf(ostream& os, vtkIndent indent) override;
161 
166  void Initialize(vtkTypeUInt32 seed) override { this->SetSeed(seed); }
167 
182  void SetSeed(int value);
183 
195  void SetSeedOnly(int value);
196 
201  int GetSeed();
202 
207  double GetValue() override;
208 
212  void Next() override;
213 
226  virtual double GetRangeValue(double rangeMin, double rangeMax);
227 
233  double GetNextRangeValue(double rangeMin, double rangeMax);
234 
235 protected:
238 
239  int Seed;
240 
241 private:
243  void operator=(const vtkMinimalStandardRandomSequence&) = delete;
244 };
245 
246 #endif // #ifndef vtkMinimalStandardRandomSequence_h
vtkRandomSequence
Generate a sequence of random numbers.
Definition: vtkRandomSequence.h:38
vtkMinimalStandardRandomSequence::Next
void Next() override
Move to the next number in the random sequence.
vtkMinimalStandardRandomSequence
Park and Miller Sequence of pseudo random numbers.
Definition: vtkMinimalStandardRandomSequence.h:151
vtkMinimalStandardRandomSequence::GetValue
double GetValue() override
Current value.
vtkRandomSequence.h
vtkX3D::value
@ value
Definition: vtkX3D.h:226
vtkMinimalStandardRandomSequence::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiation, type information, and printing.
vtkMinimalStandardRandomSequence::GetSeed
int GetSeed()
Get the seed of the random sequence.
vtkMinimalStandardRandomSequence::SetSeedOnly
void SetSeedOnly(int value)
Set the seed of the random sequence.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkMinimalStandardRandomSequence::Seed
int Seed
Definition: vtkMinimalStandardRandomSequence.h:239
vtkMinimalStandardRandomSequence::SetSeed
void SetSeed(int value)
Set the seed of the random sequence.
vtkMinimalStandardRandomSequence::Initialize
void Initialize(vtkTypeUInt32 seed) override
Satisfy general API of vtkRandomSequence superclass.
Definition: vtkMinimalStandardRandomSequence.h:166
vtkMinimalStandardRandomSequence::vtkMinimalStandardRandomSequence
vtkMinimalStandardRandomSequence()
vtkMinimalStandardRandomSequence::GetRangeValue
virtual double GetRangeValue(double rangeMin, double rangeMax)
Convenient method to return a value in a specific range from the range [0,1.
vtkMinimalStandardRandomSequence::New
static vtkMinimalStandardRandomSequence * New()
Standard methods for instantiation, type information, and printing.
vtkMinimalStandardRandomSequence::~vtkMinimalStandardRandomSequence
~vtkMinimalStandardRandomSequence() override
vtkMinimalStandardRandomSequence::GetNextRangeValue
double GetNextRangeValue(double rangeMin, double rangeMax)
Get the next value in the sequence within a range.