Mantid
Loading...
Searching...
No Matches
SobolSequence.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
9//------------------------------------------------------------------------------
10// Includes
11//------------------------------------------------------------------------------
13#include <gsl/gsl_qrng.h>
14
15//------------------------------------------------------------------------------
16// Forward declarations
17//------------------------------------------------------------------------------
18
19namespace Mantid {
20namespace Kernel {
26class MANTID_KERNEL_DLL SobolSequence : public QuasiRandomNumberSequence {
27public:
29 explicit SobolSequence(const unsigned int ndims);
31 ~SobolSequence() override;
32
34 SobolSequence() = delete;
35
37 SobolSequence(const SobolSequence &) = delete;
38
41
43 void generateNextPoint() override;
45 void restart() override;
47 void save() override;
50 void restore() override;
51
52private:
54 void setNumberOfDimensions(const unsigned int ndims);
56 void deleteCurrentGenerator();
57
59 gsl_qrng *m_gslGenerator;
62};
63} // namespace Kernel
64} // namespace Mantid
Defines an interface to a quasi-random number sequence.
Defines a generator that produces quasi-random numbers according to a Sobol sequence http://en....
Definition: SobolSequence.h:26
SobolSequence()=delete
Disable default constructor.
SobolSequence(const SobolSequence &)=delete
Disable copy operator.
SobolSequence & operator=(const SobolSequence &)=delete
Disable assignment operator.
gsl_qrng * m_gslGenerator
GSL quasi-random number state generator.
Definition: SobolSequence.h:59
gsl_qrng * m_savedGenerator
Allocated object for save state calls.
Definition: SobolSequence.h:61
Helper class which provides the Collimation Length for SANS instruments.