ParaMonte MATLAB 3.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
FileContentsSampleDRAM Class Reference

This is the base class for generating objects that contain the contents of a sample/chain file generated by a ParaMonte sampler.
This class is meant to be primarily internally used by the ParaMonte MATLAB library samplers.
More...

Inheritance diagram for FileContentsSampleDRAM:
Collaboration diagram for FileContentsSampleDRAM:

Public Member Functions

function FileContentsSampleDRAM (in file, in silent, in sep)
 Return a scalar object of class pm.sampling.FileContentsSampleDRAM.
This is the constructor of the class pm.sampling.FileContentsSampleDRAM.
More...
 

Detailed Description

This is the base class for generating objects that contain the contents of a sample/chain file generated by a ParaMonte sampler.
This class is meant to be primarily internally used by the ParaMonte MATLAB library samplers.

Note
See the documentation of the class constructor pm.sampling.FileContentsSampleDRAM::FileContentsSampleDRAM.
See below for information on the methods.
See also the documentation of the superclass pm.sampling.FileContentsSample.


Final Remarks


If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.

  1. If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
  2. If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.

This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.

Author:
Joshua Alexander Osborne, May 21 2024, 3:32 AM, University of Texas at Arlington
Fatemeh Bagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.
Amir Shahmoradi, May 16 2016, 9:03 AM, Oden Institute for Computational Engineering and Sciences (ICES), UT Austin

Definition at line 24 of file FileContentsSampleDRAM.m.

Constructor & Destructor Documentation

◆ FileContentsSampleDRAM()

function FileContentsSampleDRAM::FileContentsSampleDRAM ( in  file,
in  silent,
in  sep 
)

Return a scalar object of class pm.sampling.FileContentsSampleDRAM.
This is the constructor of the class pm.sampling.FileContentsSampleDRAM.

Parameters
[in]file: The input scalar MATLAB string containing the path to an external file.
[in]silent: See the corresponding argument of pm.sampling.FileContentsRestart class.
(optional. The default is set by pm.sampling.FileContentsRestart.)
[in]sep: The input scalar MATLAB string containing the field separator used in the file.
(optional, default = ",")
Returns
self : The output scalar object of class pm.sampling.FileContentsSampleDRAM.


Possible calling interfaces

contents = pm.sampling.FileContentsSampleDRAM(file)
contents = pm.sampling.FileContentsSampleDRAM(file, [])
contents = pm.sampling.FileContentsSampleDRAM(file, silent)
contents = pm.sampling.FileContentsSampleDRAM(file, [], [])
contents = pm.sampling.FileContentsSampleDRAM(file, [], sep)
contents = pm.sampling.FileContentsSampleDRAM(file, silent, [])
contents = pm.sampling.FileContentsSampleDRAM(file, silent, sep)


Example usage

1close all
2clear all
3cd(fileparts(mfilename('fullpath'))); % Change working directory to source code directory.
4addpath('../../../'); % Add the ParaMonte library root directory to the search path.
5
6url = "https://raw.githubusercontent.com/cdslaborg/paramontex/fbeca6745684c798ff28c1bf57cfae0c190db478/MATLAB/mlx/";
7file = "regression_powerlaw_data_paradram/out/regression_powerlaw_process_1_sample.txt";
8sampler = pm.sampling.Paradram();
9sample = sampler.readSample(url + file);
10sample = sample{1};
11
12for vistype = string(fields(sample.vis))'
13 disp("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
14 for plottype = string(fields(sample.vis.(vistype)))'
15 sample.vis.(vistype).(plottype).make("figure", {"visible", "off"});
16 figname = join(["FileContentsSampleDRAM", vistype, plottype], ".");
17 if strcmpi(vistype, "cascade")
18 figname = [figname + "." + string(1 : numel(sample.vis.(vistype).(plottype).window))];
19 end
20 disp("figname")
21 disp( figname )
22 sample.vis.(vistype).(plottype).savefig( figname + ".png", "-m3");
23 end
24 disp("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
25end
function root()
Return a scalar MATLAB string containing the root directory of the ParaMonte library package.
function savefig(in varargin)
Export figures in a publication-quality format.

Visualization of the example output






























































































































Final Remarks


If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.

  1. If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
  2. If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.

This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.

Author:
Amir Shahmoradi, 7:41 PM Friday, November 8, 2024, Dallas, TX
Fatemeh Bagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.

The documentation for this class was generated from the following file: