ParaMonte MATLAB 3.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
run.m
Go to the documentation of this file.
1%> \brief
2%> Run the ParaDRAM sampler and return nothing.
3%>
4%> \details
5%> For example usage, see the documentation of the parent class of this method [pm.sampler.Paradram](@ref Paradram).<br>
6%>
7%> \param[inout] self : The input/output parent object of class [pm.sampling.Paradram](@ref Paradram)
8%> which is **implicitly** passed to this dynamic method (not by the user).<br>
9%> \param[in] getLogFunc : The input MATLAB function handle or anonymous (lambda) function
10%> containing the implementation of the objective function to be sampled.<br>
11%> This user-specified function must have the following interface,
12%> \code{.m}
13%> function logFunc = getLogFunc(state)
14%> end
15%> \endcode
16%> where,
17%> <ol>
18%> <li> the input argument ``state`` is a vector of type MATLAB ``double``
19%> of size ``ndim`` representing a single point from within the ``ndim``
20%> dimensional domain of the mathematical object function to be explored.<br>
21%> <li> the output argument `logFunc` is a scalar of the same type as the
22%> input ``state`` containing the natural logarithm of the objective
23%> function at the specified input ``state`` within its domain.<br>
24%> </ol>
25%> \param[in] ndim : The input scalar positive-valued whole-number representing the number of dimensions
26%> of the domain of the user-specified objective function in the input ``getLogFunc()``.
27%>
28%> \interface{run}
29%> \code{.m}
30%>
31%> sampler = pm.sampling.Paradram();
32%> sampler.run(getLogFunc, ndim);
33%>
34%> \endcode
35%>
36%> \final{run}
37%>
38%> \author
39%> \AmirShahmoradi, September 1, 2012, 12:00 AM, National Institute for Fusion Studies, The University of Texas at Austin%>
40function run(self, getLogFunc, ndim)
41if nargin < 3
42 help("pm.sampling.Paradram.run");
43 error ( newline ...
44 + "The `run()` method of the " + self.method + " sampler" + newline ...
45 + "requires at least two input arguments: ``getLogFunc()`` and ``ndim``" + newline ...
46 + "For more information on the input arguments," + newline ...
47 + "see the method documentation shown above." + newline ...
48 + newline ...
49 );
50end
51self.name = string(inputname(1));
52run@pm.sampling.Sampler(self, getLogFunc, ndim);
53end
This is the ParaDRAM class for generating instances of serial and parallel Delayed-Rejection Adaptive...
Definition: Paradram.m:18
function getLogFunc(in point)
function which(in vendor)
Return the a MATLAB string containing the path to the first mpiexec executable binary found in system...