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