SST  14.1.0
StructuralSimulationToolkit
distrib.h
1 // Copyright 2009-2024 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-2024, 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 {
18 namespace RNG {
19 
20 /**
21  * \class RandomDistribution
22  * Base class of statistical distributions in SST.
23  */
25 {
26 
27 public:
28  /**
29  Obtains the next double from the distribution
30  \return The next double in the distribution being sampled
31  */
32  virtual double getNextDouble() = 0;
33 
34  /**
35  Destroys the distribution
36  */
37  virtual ~RandomDistribution() {}
38 
39  /**
40  Creates the base (abstract) class of a distribution
41  */
43 
44  virtual void serialize_order(SST::Core::Serialization::serializer& UNUSED(ser)) override {}
45 
46  ImplementVirtualSerializable(SST::RNG::RandomDistribution)
47 };
48 
49 using SSTRandomDistribution = SST::RNG::RandomDistribution;
50 
51 } // namespace RNG
52 } // namespace SST
53 
54 #endif // SST_CORE_RNG_DISTRIB_H
This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition: serializer.h:43
Definition: action.cc:18
virtual ~RandomDistribution()
Destroys the distribution.
Definition: distrib.h:37
Definition: serializable.h:24
virtual double getNextDouble()=0
Obtains the next double from the distribution.
RandomDistribution()
Creates the base (abstract) class of a distribution.
Definition: distrib.h:42
Base class of statistical distributions in SST.
Definition: distrib.h:24