SST  15.1.0
StructuralSimulationToolkit
distrib.h
1 // Copyright 2009-2025 NTESS. Under the terms
2 // of Contract DE-NA0003525 with NTESS, the U.S.
3 // Government retains certain rights in this software.
4 //
5 // Copyright (c) 2009-2025, NTESS
6 // All rights reserved.
7 //
8 // This file is part of the SST software package. For license
9 // information, see the LICENSE file in the top level directory of the
10 // distribution.
11 
12 #ifndef SST_CORE_RNG_DISTRIB_H
13 #define SST_CORE_RNG_DISTRIB_H
14 
15 #include "sst/core/serialization/serializable.h"
16 
17 namespace SST::RNG {
18 
19 /**
20  * \class RandomDistribution
21  * Base class of statistical distributions in SST.
22  */
24 {
25 
26 public:
27  /**
28  Obtains the next double from the distribution
29  \return The next double in the distribution being sampled
30  */
31  virtual double getNextDouble() = 0;
32 
33  /**
34  Destroys the distribution
35  */
36  virtual ~RandomDistribution() {}
37 
38  /**
39  Creates the base (abstract) class of a distribution
40  */
42 
43  virtual void serialize_order(SST::Core::Serialization::serializer& UNUSED(ser)) override {}
44 
45  ImplementVirtualSerializable(SST::RNG::RandomDistribution)
46 };
47 
48 } // namespace SST::RNG
49 
51 
52 #endif // SST_CORE_RNG_DISTRIB_H
Definition: constant.h:18
This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition: serializer.h:42
virtual ~RandomDistribution()
Destroys the distribution.
Definition: distrib.h:36
Definition: serializable.h:23
virtual double getNextDouble()=0
Obtains the next double from the distribution.
RandomDistribution()
Creates the base (abstract) class of a distribution.
Definition: distrib.h:41
Base class of statistical distributions in SST.
Definition: distrib.h:23