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