SST 15.0
Structural Simulation Toolkit
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
17namespace SST::RNG {
18
19/**
20 * \class RandomDistribution
21 * Base class of statistical distributions in SST.
22 */
24{
25
26public:
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 */
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
50using SSTRandomDistribution = SST::RNG::RandomDistribution;
51
52#endif // SST_CORE_RNG_DISTRIB_H
Definition serializable.h:24
This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition serializer.h:45
Base class of statistical distributions in SST.
Definition distrib.h:24
virtual double getNextDouble()=0
Obtains the next double from the distribution.
virtual ~RandomDistribution()
Destroys the distribution.
Definition distrib.h:36
RandomDistribution()
Creates the base (abstract) class of a distribution.
Definition distrib.h:41