VTK  9.3.20240419
vtkRandomSequence.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
20 #ifndef vtkRandomSequence_h
21 #define vtkRandomSequence_h
22 
23 #include "vtkCommonCoreModule.h" // For export macro
24 #include "vtkObject.h"
25 
26 VTK_ABI_NAMESPACE_BEGIN
27 class VTKCOMMONCORE_EXPORT vtkRandomSequence : public vtkObject
28 {
29 public:
31 
34  vtkTypeMacro(vtkRandomSequence, vtkObject);
35  void PrintSelf(ostream& os, vtkIndent indent) override;
37 
41  virtual void Initialize(vtkTypeUInt32 seed) = 0;
42 
46  virtual double GetValue() = 0;
47 
51  virtual void Next() = 0;
52 
56  double GetNextValue();
57 
58 protected:
60  ~vtkRandomSequence() override;
61 
62 private:
63  vtkRandomSequence(const vtkRandomSequence&) = delete;
64  void operator=(const vtkRandomSequence&) = delete;
65 };
66 
67 VTK_ABI_NAMESPACE_END
68 #endif // #ifndef vtkRandomSequence_h
a simple class to control print indentation
Definition: vtkIndent.h:108
abstract base class for most VTK objects
Definition: vtkObject.h:162
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.