VTK  9.1.0
vtkRandomSequence.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkRandomSequence.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=========================================================================*/
31#ifndef vtkRandomSequence_h
32#define vtkRandomSequence_h
33
34#include "vtkCommonCoreModule.h" // For export macro
35#include "vtkObject.h"
36
37class VTKCOMMONCORE_EXPORT vtkRandomSequence : public vtkObject
38{
39public:
41
45 void PrintSelf(ostream& os, vtkIndent indent) override;
47
51 virtual void Initialize(vtkTypeUInt32 seed) = 0;
52
56 virtual double GetValue() = 0;
57
61 virtual void Next() = 0;
62
66 double GetNextValue();
67
68protected:
71
72private:
73 vtkRandomSequence(const vtkRandomSequence&) = delete;
74 void operator=(const vtkRandomSequence&) = delete;
75};
76
77#endif // #ifndef vtkRandomSequence_h
a simple class to control print indentation
Definition: vtkIndent.h:113
abstract base class for most VTK objects
Definition: vtkObject.h:82
Generate a sequence of random numbers.
virtual void Initialize(vtkTypeUInt32 seed)=0
Initialize the sequence with a seed.
~vtkRandomSequence() override
double GetNextValue()
Advance the sequence and return the new value.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for type information and printing.
virtual void Next()=0
Move to the next number in the random sequence.
virtual double GetValue()=0
Return the current value.