ParaMonte MATLAB 3.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
FileContentsReport.m
Go to the documentation of this file.
1%> \brief
2%> This is the base class for generating objects
3%> that contain the contents of a report file
4%> generated by a ParaMonte sampler.<br>
5%>
6%> \details
7%> This class is meant to be primarily internally
8%> used by the ParaMonte MATLAB library samplers.<br>
9%> See the documentation of the class constructor.
10%>
11%> \note
12%> See below for information on the attributes (properties).<br>
13%>
14%> \note
15%> See below for information on the methods.<br>
16%>
17%> \final{FileContentsReport}
18%>
19%> \author
20%> \JoshuaOsborne, May 21 2024, 1:13 AM, University of Texas at Arlington<br>
21%> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
22%> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute for Computational Engineering and Sciences (ICES), UT Austin<br>
23classdef FileContentsReport < pm.io.FileContents
24
25 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
26
27 properties(Access = public)
28 %>
29 %> ``stats``
30 %>
31 %> The scalar MATLAB ``struct`` containing the set of
32 %> computed properties extracted from the report file.<br>
33 %>
34 stats = struct();
35 %>
36 %> ``contents``
37 %>
38 %> The scalar MATLAB string containing the entire
39 %> contents of the report file with all Carriage Return
40 %> characters removed (relevant only to Windows OS).<br>
41 %>
42 contents = [];
43 %>
44 %> ``lineList``
45 %>
46 %> The vector of MATLAB strings containing the set of
47 %> all lines in the report file with all Carriage Return
48 %> and New Line characters removed.<br>
49 %>
50 lineList = [];
51 %>
52 %> ``vis``
53 %>
54 %> The scalar MATLAB ``struct`` containing the set of
55 %> predefined visualizations for the output data.<br>
56 %>
57 vis = [];
58 %>
59 %> ``banner``
60 %>
61 %> The scalar MATLAB ``string`` containing the ParaMonte
62 %> library banner as appearing in the report file.<br>
63 %>
64 banner = "";
65 % %
66 % % ``setup``
67 % %
68 % % The scalar MATLAB ``struct`` containing the sampler
69 % % setup information extracted from the report file.
70 % %
71 % setup = struct();
72 % %
73 % % ``spec``
74 % %
75 % % The scalar MATLAB ``struct`` containing the set of
76 % % simulation specifications extracted from the report file.
77 % %
78 % spec = struct();
79 end
80
81 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
82
83 properties(Hidden)
84 %>
85 %> ``lineListLen``
86 %>
87 %> This is an internal class variable inaccessible to the end users.<br>
88 %>
89 lineListLen = [];
90 % %>
91 % %> ``indentLen``
92 % %>
93 % %> The scalar MATLAB integer representing the number of indentation
94 % %> characters at the beginning of each description line in the report file.<br>
95 % %> This is an internal class variable inaccessible to the end users.<br>
96 % %>
97 % indentLen = 4; % indent length of the records
98 % %>
99 % %> ``dsymLen``
100 % %>
101 % %> The scalar MATLAB integer representing the minimum length of two of decoration symbols.<br>
102 % %> This is an internal class variable inaccessible to the end users.<br>
103 % %>
104 % dsymLen = 2;
105 %>
106 %> ``dsym``
107 %>
108 %> The scalar MATLAB string representing the decoration symbol used in
109 %> the report file, to be determined at runtime (currently ``%``).<br>
110 %> This is an internal class variable inaccessible to the end users.<br>
111 %>
112 dsym = '';
113 %>
114 %> ``prefix``
115 %>
116 %> The scalar MATLAB string representing the prefix used in the description lines of the report file.<br>
117 %> This is an internal class variable inaccessible to the end users.<br>
118 %>
119 prefix = ' - NOTE: ';
120 %>
121 %> ``method``
122 %>
123 %> The scalar MATLAB string representing the sample name.<br>
124 %> This is an internal class variable inaccessible to the end users.<br>
125 %>
126 method = '';
127 %iend = 0;
128 end
130 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
131
132 methods(Access = public)
133
134 %> \brief
135 %> Return a scalar object of class [pm.sampling.FileContentsReport](@ref FileContentsReport).<br>
136 %>
137 %> \details
138 %> This is the constructor of the class [pm.sampling.FileContentsReport](@ref FileContentsReport).<br>
139 %>
140 %> \param[in] file : The input scalar MATLAB string containing the path to an external report file.<br>
141 %> \param[in] silent : See the corresponding argument of [pm.io.FileContents](@ref FileContents) class.<br>
142 %> (**optional**. The default is set by [pm.io.FileContents](@ref FileContents).)
143 %> \param[in] method : The input scalar MATLAB string
144 %> containing the sampling method name.<br>
145 %> The input value must be any of the following:<br>
146 %> <ol>
147 %> <li> ``"ParaDRAM"``
148 %> <li> ``"ParaDISE"``
149 %> <li> ``"ParaNest"``
150 %> </ol>
151 %> (**optional**. If missing, some of the report file contents may not be properly parsed.)
152 %>
153 %> \return
154 %> ``self`` : The output scalar object of class [pm.sampling.FileContentsReport](@ref FileContentsReport).<br>
155 %>
156 %> \interface{FileContentsReport}
157 %> \code{.m}
158 %>
159 %> contents = pm.sampling.FileContentsReport(file)
160 %> contents = pm.sampling.FileContentsReport(file, [])
161 %> contents = pm.sampling.FileContentsReport(file, silent)
162 %> contents = pm.sampling.FileContentsReport(file, [], [])
163 %> contents = pm.sampling.FileContentsReport(file, silent, [])
164 %> contents = pm.sampling.FileContentsReport(file, silent, method)
165 %>
166 %> \endcode
167 %>
168 %> \example{FileContentsReport}
169 %> \include{lineno} example/sampling/FileContentsReport/main.m
170 %> \vis{FileContentsReport}
171 %> <br><br>
172 %> \image html example/sampling/Paradram/himmelblau/Paradram.himmelblau.parallelism.speedup.scaling.strong.sameeff.png width=700
173 %> <br><br>
174 %> \image html example/sampling/Paradram/himmelblau/Paradram.himmelblau.parallelism.speedup.scaling.strong.zeroeff.png width=700
175 %>
176 %> \final{FileContentsReport}
177 %>
178 %> \author
179 %> \JoshuaOsborne, May 21 2024, 1:30 AM, University of Texas at Arlington<br>
180 %> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
181 %> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute for Computational Engineering and Sciences (ICES), UT Austin<br>
182 function self = FileContentsReport(file, silent, method)
183
184 if nargin < 2
185 silent = [];
186 end
187 self = self@pm.io.FileContents(file, silent);
188 if 2 < nargin
189 self.method = convertStringsToChars(method);
190 self.prefix = [self.method, self.prefix];
191 end
192
193 %%%%
194 %%%% remove any CARRIAGE RETURN.
195 %%%%
196
197 self.contents = strrep(fileread(file), char(13), '');
198 self.contents = strrep(self.contents, newline, [' ', newline]);
199 self.lineList = strsplit(self.contents, newline);
200 self.lineListLen = length(self.lineList);
201 iend = 1; % the line we are about to parse.
202
203 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
204 %%%% determine the decoration symbol and read the banner.
205 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
206
207 %%%%
208 %%%% Here we assume the first non-empty line starts with the symbol character (likely ``%``).
209 %%%%
210
211 ibeg = self.skipNull(iend);
212 failed = self.lineListLen < ibeg || length(self.lineList{ibeg}) < 4;
213 if ~failed
214 line = self.lineList{ibeg};
215 failed = any(line(1) ~= line(2 : 4));
216 if ~failed
217 iend = self.skipFull(ibeg + 1);
218 failed = self.lineListLen < iend;
219 end
220 end
221 if ~failed
222 self.dsym = line(1);
223 self.banner = self.concat(self.lineList(ibeg : iend));
224 else
225 self.warn(line, "Failed to detect the decoration symbol used in the report file.");
226 end
227
228 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
229 %%%% read the ParaMonte MATLAB library interface specifications
230 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
231
232 %self.setup.library.interface = self.parseSection("interface.specifications");
233
234 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
235 %%%% read the ParaMonte MATLAB library compiler version
236 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
237
238 %self.setup.library.compiler.version = self.parseSection("compiler.version");
239
240 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
241 %%%% read the ParaMonte MATLAB library compiler options
242 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
243
244 %self.setup.library.compiler.options = self.parseSection("compiler.options");
245
246 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
247 %%%% read the Runtime platform specifications
248 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
249
250 %self.setup.platform = self.parseSection("runtime.platform.specifications");
251
252 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
253 %%%% read the simulation environment
254 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
255
256 %self.setup.io = self.parseSection("simulation.environment");
257
258 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
259 %%%% read the simulation specifications
260 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
261
262 %self.spec.base = self.parseSection("simulation.specifications.base");
263 %if self.method == "ParaDRAM" || self.method == "ParaDISE"
264 % self.spec.mcmc = self.parseSection("simulation.specifications.mcmc");
265 % self.spec.dram = self.parseSection("simulation.specifications.dram");
266 %elseif self.method == "ParaNest"
267 % self.spec.nest = self.parseSection("simulation.specifications.nest");
268 %end
269
270 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
271 %%%% statistics: this must be always the last item to parse
272 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
273
274 self.checkpoint("parsing the simulation statistics...", 1);
275
276 while true
277
278 item = self.lineList{iend};
279 if ~self.silent
280 self.spinner.spin(iend / self.lineListLen);
281 end
282 if strcmp(item(1 : min(6, length(item))), 'stats.')
283
284 %%%%
285 %%%% First non-empty line.
286 %%%%
287
288 ibeg = self.skipNull(iend + 1);
289 failed = self.lineListLen < ibeg;
290 if ~failed
291 iend = self.skipFull(ibeg + 1);
292 failed = self.lineListLen < iend;
293 if ~failed
294 % Retrieve the value.
295 % The strategy is to read all values as table by dumping
296 % the value in a temporary file and reading it as a table.
297 tempfile = tempname();
298 fid = fopen(tempfile, "w");
299 fprintf(fid, self.concat(strtrim(self.lineList(ibeg : iend - 1))));
300 fclose(fid);
301 df = readtable(tempfile);
302 %if numel(df.Properties.VariableNames) == 1
303 % if strcmpi(df.Properties.VariableNames(1), "Var1")
304 % df.Properties.VariableNames(1) = "value";
305 % end
306 %end
307 %self.(strtrim(item)).df = df;
308 eval(['self.', strtrim(item), '.df = df;']);
309 end
310 end
311
312 %%%%
313 %%%% Retrieve the description.
314 %%%%
315
316 ibeg = self.skipNull(iend + 1);
317 iend = self.skipFull(ibeg + 1);
318 if ~all(self.isdesc(self.lineList(ibeg : iend - 1)))
319 self.warn(string(ibeg) + "-" + string(iend), "A description record does not contain """ + string(self.prefix) + """");
320 else
321 % Concatenate lines and remove prefixes from each description lines.
322 desc = strrep(self.concat(strtrim(self.lineList(ibeg : iend - 1))), self.prefix, '');
323 eval(['self.', strtrim(item), '.description = desc;']);
324 %self.(strtrim(item)).description = desc;
325 end
326
327 end % new item found
328
329 iend = iend + 1;
330 if self.lineListLen < iend
331 break;
332 end
333
334 end % while
335
336 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
337
338 self.checkpoint();
339
340 %%%%
341 %%%% Add the parallel scaling visualizations.
342 %%%%
343
344 silent_kws = {"silent", self.silent};
345
346 try
347 for parcond = ["sameeff", "zeroeff"]
348 if strcmp(parcond, "sameeff")
349 titletext = "Strong Scaling: Current-Efficiency Sampling";
350 elseif strcmp(parcond, "zeroeff")
351 titletext = "Strong Scaling: Zero-Efficiency Sampling";
352 else
353 error ( newline ...
354 + "Internal ParaMonte library error occurred." + newline ...
355 + "Please report this error to the ParaMonte library developers." + newline ...
356 + newline ...
357 );
358 end
359 self.stats.parallelism.speedup.scaling.strong.(parcond).vis = struct();
360 self.stats.parallelism.speedup.scaling.strong.(parcond).vis.desc ...
361 = "This component is added in the post-processing phase to facilitate quick " ...
362 + "visualization of the parallel scaling behavior of the sampler under the " + parcond + " parallel conditions.";
363 self.stats.parallelism.speedup.scaling.strong.(parcond).vis.lineScatter = ...
364 pm.vis.PlotLineScatter ( self.stats.parallelism.speedup.scaling.strong.(parcond).df ...
365 , "colx", 1, "coly", 2, "colc", 2, "axes", {"xscale", "log"} ...
366 , "scatter", {"size", 10, "color", pm.vis.color.rgb("red")} ...
367 ..., "colormap", {"enabled", false, "map", "autumn"} ...
368 , "title", {"enabled", true, "titletext", titletext} ...
369 , "plot", {"linewidth", 2.5} ...
370 , silent_kws{:} ...
371 );
372 end
373 catch me
374 warning ( newline ...
375 + "Failed to create the visualizations for the parallelization scaling behavior of the sampler." + newline ...
376 + "It is possible that the component ``stats.parallelism.speedup.scaling.strong.(parcond).df`` of the " + newline ...
377 + "output ``report`` object of class ``pm.sampling.FileContentsReport`` does not exist, where " + newline ...
378 + "the string `parcond` can be either ``optimal`` or ``perfect``." + newline ...
379 + "Here is the error message:" + newline ...
380 + newline ...
381 + string(me.identifier) + newline + string(me.message) + newline ...
382 + newline ...
383 );
384 end
385
386 %%%%
387 %%%% Add the parallel process contribution visualizations.
388 %%%%
389
390 try
391 %%%%
392 %%%% Set up the Cyclic Geometric fit to parallel processes contributions.
393 %%%%
394
395 cgfit = @(iproc, successProb, normFac, processCount) ...
396 successProb .* normFac .* (1 - successProb).^(iproc - 1) ./ (1 - (1 - successProb).^processCount);
397
398 %%%%
399 %%%% Set up the data frame containing the processes contributions and its Cyclic Geometric fit to parallel processes contributions.
400 %%%%
401
402 dfpc = self.stats.parallelism.process.contribution.count.current.df;
403 dfpc.cyclicGeometricFit = cgfit ( dfpc.processID ...
404 , self.stats.parallelism.process.contribution.count.current.fit.df.successProb ...
405 , self.stats.parallelism.process.contribution.count.current.fit.df.normFac ...
406 , self.stats.parallelism.process.count.current.df.Var1 ...
407 );
408 self.stats.parallelism.process.contribution.count.current.vis = struct();
409 self.stats.parallelism.process.contribution.count.current.vis.desc = ...
410 "This component is added in the post-processing phase to facilitate quick " + ...
411 "visualization of the contributions of the parallel processes to the final chain.";
412 self.stats.parallelism.process.contribution.count.current.vis.line = ...
413 pm.vis.PlotLine ( dfpc ...
414 , "colx", "processID", "coly", 2:3, "axes", {"xscale", "log", "yscale", "log"} ...
415 , "ylabel", {"txt", "Accepted-Sample Contribution"} ...
416 , "xlabel", {"txt", "Process ID"} ...
417 , "colormap", {"enabled", false} ...
418 , "legend", {"enabled", true} ...
419 , "plot", {"linewidth", 2.5} ...
420 , silent_kws{:} ...
421 );
422 catch me
423 warning ( newline ...
424 + "Failed to create the visualizations for the parallel processes contributions and their Cyclic Geomtric fit." + newline ...
425 + "It is possible that the component ``stats.parallelism.current.process.contribution`` of the " + newline ...
426 + "output ``report`` object of class ``pm.sampling.FileContentsReport`` does not exist, or " + newline ...
427 + "its sub-components are missing." + newline ...
428 + "Here is the error message:" + newline ...
429 + newline ...
430 + string(me.identifier) + newline + string(me.message) + newline ...
431 + newline ...
432 );
433 end
434
435 end % constructor
436
437 end % methods(Access = public)
438
439 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
440
441 methods(Hidden, Static)
442
443 %function reportParseFailure(topic)
444 % topic = string(strtrim(strrep(strrep(topic, newline, ' '), char(13), ' ')));
445 % warning ( newline ...
446 % + "Failed to parse the record """ + topic + """. " + newline ...
447 % + "The structure of the report file appears to have been compromised. Skipping..." + newline ...
448 % + newline ...
449 % );
450 %end
451 %
452 %function reportMissingValue(topic)
453 % topic = string(strtrim(strrep(strrep(topic, newline, ' '), char(13), ' ')));
454 % warning ( newline ...
455 % + "Failed to parse the value corresponding to the record """ + topic + """. " + newline ...
456 % + "The structure of the report file appears to have been compromised. Skipping..." + newline ...
457 % + newline ...
458 % );
459 %end
460
461 function str = concat(lines)
462 % Concatenate the elements of an input cell array by
463 % the new line character and return the result as a single string.
464 str = string(join(lines, newline));
465 end
466
467 end
468
469 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
470
471 methods(Hidden)
472
473 %function result = isSectionHeader(self, record)
474 % result = self.dsymLen < length(record) && contains(record(1 : self.dsymLen), self.dsym);
475 %end
476 %
477 %function stopBeforeNextSectionHeader(self)
478 % % NOTE: if it is already within a section header, it will skip it and find the next section header.
479 % record = self.lineList{iend};
480 % isCurrentSectionHeader = self.dsymLen < length(record) && contains(record(1 : self.dsymLen), self.dsym);
481 % while true
482 % if iend == self.lineListLen
483 % break;
484 % end
485 % record = self.lineList{iend};
486 % if self.dsymLen < length(record) && contains(record(1 : self.dsymLen), self.dsym)
487 % if isCurrentSectionHeader
488 % iend = iend + 1;
489 % continue;
490 % else
491 % iend = iend - 1;
492 % break;
493 % end
494 % else
495 % isCurrentSectionHeader = false;
496 % iend = iend + 1;
497 % continue;
498 % end
499 % end
500 %end
501 %
502 %function skipCurrentSectionHeader(self)
503 % while true
504 % record = self.lineList{iend};
505 % if self.dsymLen < length(record) && contains(record(1 : self.dsymLen), self.dsym)
506 % iend = iend + 1;
507 % if iend == self.lineListLen
508 % break;
509 % end
510 % continue;
511 % else
512 % break;
513 % end
514 % end
515 %end
516 %
517 %function section = parseSection(self, topic)
518 % ilineLastSuccess = iend;
519 % topic = lower(topic);
520 % section = [];
521 % topicFound = false;
522 % while true
523 % iend = iend + 1;
524 % if self.lineListLen <= iend
525 % break;
526 % end
527 % record = lower(self.lineList{iend});
528 % if contains(record, topic)
529 % topicFound = true;
530 % break;
531 % else
532 % continue;
533 % end
534 % end
535 % if topicFound
536 % self.skipCurrentSectionHeader();
537 % lineStart = iend;
538 % self.stopBeforeNextSectionHeader();
539 % section = self.concat(lineStart, iend);
540 % else
541 % self.reportParseFailure(topic);
542 % iend = ilineLastSuccess;
543 % end
544 %end
545
546 function result = isdesc(self, record)
547 result = contains(record, self.prefix);
548 end
549
550 function iend = skipNull(self, ibeg)
551 % skip the empty lines after the current
552 % until encountering the first non-empty line.
553 iend = ibeg;
554 while true
555 if self.lineListLen < iend
556 break;
557 elseif ~isempty(strtrim(self.lineList{iend}))
558 break;
559 end
560 iend = iend + 1;
561 end
562 end
563
564 function iend = skipFull(self, ibeg)
565 % skip the nonempty lines after the current
566 % until encountering the first empty line.
567 iend = ibeg;
568 while true
569 if self.lineListLen < iend
570 break;
571 elseif isempty(strtrim(self.lineList{iend}))
572 break;
573 end
574 iend = iend + 1;
575 end
576 end
577
578 end
579
580 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
581
582end
function name(in vendor)
Return the MPI library name as used in naming the ParaMonte MATLAB shared library directories.
function version(in silent)
Return a scalar MATLAB string containing the latest available ParaMonte MATLAB version newer than the...
function banner()
Return a scalar MATLAB string containing the ParaMonte MATLAB library banner.
This is the base class for generating objects that contain the contents of a report file generated by...
function skipNull(in self, in ibeg)
function isdesc(in self, in record)
function skipFull(in self, in ibeg)
static function concat(in lines)
function FileContentsReport(in file, in silent, in method)
Return a scalar object of class pm.sampling.FileContentsReport.
This is the base class for generating objects that contain the contents of a given file.
Definition: FileContents.m:27
This is the ParaDRAM class for generating instances of serial and parallel Delayed-Rejection Adaptive...
Definition: Paradram.m:18
This is the PlotLineScatter class for generating instances of 2-dimensional Line-Scatter Plot visuali...
function compiler()
Return a scalar MATLAB logical that is true if and only if the current installation of MATLAB contain...
function find(in vendor)
Return a list of scalar MATLAB strings containing the paths to all detected mpiexec binaries installe...
function parallel()
Return a scalar MATLAB logical that is true if and only if the current installation of MATLAB contain...
function statistics()
Return a scalar MATLAB logical that is true if and only if the current installation of MATLAB contain...