ParaMonte MATLAB 3.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
SpecDRAM.m
Go to the documentation of this file.
1%> \brief
2%> This is the base class for the ParaMonte sampler DRAM specifications.<br>
3%>
4%> \details
5%> This is an abstract class that is not meant to be used by the user.<br>
6%> See the class constructor documentation.<br>
7%>
8%> \note
9%> All class attributes can be set after constructing an instance of this class.<br>
10%>
11%> \note
12%> The DRAM simulation specifications are all described on this page:
13%> [ParaDRAM simulation specifications listing](\pmdoc_usage_sampling/paradram/specifications/)<br>
14%>
15%> \note
16%> See below for information on the methods.<br>
17%>
18%> \final{SpecDRAM}
19%>
20%> \author
21%> \JoshuaOsborne, May 21 2024, 3:45 AM, University of Texas at Arlington<br>
22%> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
23%> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute for Computational Engineering and Sciences (ICES), UT Austin<br>
24classdef SpecDRAM < pm.sampling.SpecMCMC
25
26 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
27
28 properties
29 proposalAdaptationBurnin = [];
30 proposalAdaptationCount = [];
31 proposalAdaptationCountGreedy = [];
32 proposalAdaptationPeriod = [];
33 proposalDelayedRejectionCount = [];
34 proposalDelayedRejectionScale = [];
35 end
37 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
39 methods(Access = public)
41 %> \brief
42 %> Construct and return an object of class [pm.sampling.SpecDRAM](@ref SpecDRAM).<br>
43 %>
44 %> \param[in] method : The input scalar MATLAB string containing
45 %> the name of the specific ParaMonte sampler
46 %> whose simulation specifications are to be
47 %> stored in the output of this constructor.<br>
48 %>
49 %> \param[in] silent : The input scalar MATLAB logical.<br>
50 %> If ``true``, all descriptive messages on
51 %> the MATLAB command line will be suppressed.<br>
52 %> (**optional**, default = ``false``)
53 %>
54 %> \return
55 %> The output scalar object of class [pm.sampling.SpecDRAM](@ref SpecDRAM).<br>
56 %>
57 %> \interface{SpecDRAM}
58 %> \code{.m}
59 %>
60 %> spec = pm.sampling.SpecDRAM()
61 %> spec = pm.sampling.SpecDRAM([])
62 %> spec = pm.sampling.SpecDRAM([], [])
63 %> spec = pm.sampling.SpecDRAM(method)
64 %> spec = pm.sampling.SpecDRAM(method, [])
65 %> spec = pm.sampling.SpecDRAM([], silent)
66 %> spec = pm.sampling.SpecDRAM(method, silent)
67 %>
68 %> \endcode
69 %>
70 %> \final{SpecDRAM}
71 %>
72 %> \author
73 %> \JoshuaOsborne, May 21 2024, 3:46 AM, University of Texas at Arlington<br>
74 %> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
75 %> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute for Computational Engineering and Sciences (ICES), UT Austin<br>
76 function self = SpecDRAM(method, silent)
77 if nargin < 2
78 silent = [];
79 end
80 if nargin < 1
81 method = "ParaDRAM";
82 end
83 self = self@pm.sampling.SpecMCMC(method, silent);
84 self.url = "https://www.cdslab.org/paramonte/generic/" + pm.lib.version("generic", "major") + "/usage/sampling/paradram/specifications/";
85 end
86
87 end
88
89 methods(Hidden)
90
91 %> \brief
92 %> Ensure all specification properties of the parent object are sensible.<br>
93 %>
94 %> \details
95 %> This is a dynamic method of the class [pm.sampling.SpecDRAM](@ref SpecDRAM).<br>
96 %>
97 %> \param[in] self : The input parent object of class [pm.sampling.SpecDRAM](@ref SpecDRAM)
98 %> which is **implicitly** passed to this dynamic method (not by the user).<br>
99 %> \param[in] ndim : The input scalar MATLAB integer containing
100 %> the number of dimensions of the domain of the
101 %> object function that is to be explored.<br>
102 %>
103 %> \return
104 %> ``entries`` : The output scalar MATLAB string containing
105 %> the simulation specifications converted to
106 %> a Fortran-namelist-compatible entry.<br>
107 %>
108 %> \interface{getEntriesNML}
109 %> \code{.m}
110 %>
111 %> entries = self.getEntriesNML(ndim)
112 %>
113 %> \endcode
114 %>
115 %> \final{getEntriesNML}
116 %>
117 %> \author
118 %> \JoshuaOsborne, May 21 2024, 3:48 AM, University of Texas at Arlington<br>
119 %> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
120 %> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute for Computational Engineering and Sciences (ICES), UT Austin<br>
121 function entries = getEntriesNML(self, ndim)
122 entries = getEntriesNML@pm.sampling.SpecMCMC(self, ndim);
123 if ~isempty(self.proposalAdaptationBurnin ); entries = entries + self.nmlsep + pm.introspection.getEntryNML("proposalAdaptationBurnin ", self.proposalAdaptationBurnin , "real" , 1); end
124 if ~isempty(self.proposalAdaptationCount ); entries = entries + self.nmlsep + pm.introspection.getEntryNML("proposalAdaptationCount ", self.proposalAdaptationCount , "integer", 1); end
125 if ~isempty(self.proposalAdaptationCountGreedy ); entries = entries + self.nmlsep + pm.introspection.getEntryNML("proposalAdaptationCountGreedy", self.proposalAdaptationCountGreedy , "integer", 1); end
126 if ~isempty(self.proposalAdaptationPeriod ); entries = entries + self.nmlsep + pm.introspection.getEntryNML("proposalAdaptationPeriod ", self.proposalAdaptationPeriod , "integer", 1); end
127 if ~isempty(self.proposalDelayedRejectionCount ); entries = entries + self.nmlsep + pm.introspection.getEntryNML("proposalDelayedRejectionCount", self.proposalDelayedRejectionCount , "integer", 1); end
128 if ~isempty(self.proposalDelayedRejectionScale ); entries = entries + self.nmlsep + pm.introspection.getEntryNML("proposalDelayedRejectionScale", self.proposalDelayedRejectionScale , "real" , self.proposalDelayedRejectionCount); end
129 end
130
131 end
132
133end
function name(in vendor)
Return the MPI library name as used in naming the ParaMonte MATLAB shared libraries.
This is the base class for the ParaMonte sampler DRAM specifications.
Definition: SpecDRAM.m:25
Property proposalDelayedRejectionScale
Definition: SpecDRAM.m:42
Property proposalAdaptationCountGreedy
Definition: SpecDRAM.m:36
function SpecDRAM(in method, in silent)
Construct and return an object of class pm.sampling.SpecDRAM.
Property proposalDelayedRejectionCount
Definition: SpecDRAM.m:40
Property proposalAdaptationCount
Definition: SpecDRAM.m:34
function getEntriesNML(in self, in ndim)
Ensure all specification properties of the parent object are sensible.
Property proposalAdaptationPeriod
Definition: SpecDRAM.m:38
Property proposalAdaptationBurnin
Definition: SpecDRAM.m:32
This is the base class for the ParaMonte sampler MCMC specifications. This is an abstract class that...
Definition: SpecMCMC.m:19
function which(in vendor)
Return the a MATLAB string containing the path to the first mpiexec executable binary found in system...