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

This is the base class for generating objects that contain the contents of a given file.
More...

Inheritance diagram for FileContents:
Collaboration diagram for FileContents:

Public Member Functions

function FileContents (in file, in silent)
 Return a scalar object of class pm.io.FileContents. More...
 
function warn (in self, in line, in msg)
 Display the input warning message about the line number line of the file whose contents are read and return nothing. More...
 
function checkpoint (in self, in msg, in advance)
 Display the input final message and return nothing. More...
 

Data Fields

Property silent
 
Property file
 
Property weblinks
 
Property spinner
 
Property timer
 

Detailed Description

This is the base class for generating objects that contain the contents of a given file.

This class is meant to be primarily internally used by the ParaMonte library routines (e.g., samplers).

Developer Remark:
The handle superclass of this class is critical for the class functionality.
See the documentation of the class constructor.
Note
See below for information on class attributes (properties).
See below for information on the methods.


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, 6:03 PM, 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 26 of file FileContents.m.

Constructor & Destructor Documentation

◆ FileContents()

function FileContents::FileContents ( in  file,
in  silent 
)

Return a scalar object of class pm.io.FileContents.

This is the constructor of the class pm.io.FileContents.
It merely serves as the blueprint for the IO subclasses accessible to the end users.

Parameters
[in]file: The input scalar MATLAB string containing the path to an external file.
[in]silent: The input scalar MATLAB logical.
If true, all descriptive messages will be suppressed.
Setting this option to false is particularly useful in MPI-parallel simulations.
(optional, default = false)
Returns
self : The output scalar object of class pm.io.FileContents.


Possible calling interfaces

contents = pm.io.FileContents(file)
contents = pm.io.FileContents(file, [])
contents = pm.io.FileContents(file, silent)
Property file
Definition: FileContents.m:45
Property silent
Definition: FileContents.m:38


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, 6:05 PM, 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

Member Function Documentation

◆ checkpoint()

function FileContents::checkpoint ( in  self,
in  msg,
in  advance 
)

Display the input final message and return nothing.

This is a Hidden method of the class pm.io.FileContents.

Parameters
[in,out]self: The implicitly-passed input/output argument representing the parent object of the method.
[in]msg: The input scalar MATLAB string containing a message to display on the MATLAB console.
(optional, default = "done in " + sprintf("%.6f", string(self.timer.del())) + " seconds.")
[in]advance: The input scalar MATLAB logical.
If true, an end of line character will be added at the end of the printed message.
(optional, default = true)


Possible calling interfaces

fc = pm.io.FileContents(file)
fc.checkpoint(msg, advance)
fc.checkpoint([], advance)
fc.checkpoint([], [])
fc.checkpoint(msg)
fc.checkpoint([])
fc.checkpoint()


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, 6:07 PM, 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

◆ warn()

function FileContents::warn ( in  self,
in  line,
in  msg 
)

Display the input warning message about the line number line of the file whose contents are read and return nothing.

This is a Hidden method of the class pm.io.FileContents.
The messaging within this routine occurs only if the silent attribute of the parent object is set to false at the time of constructing the parent object of class pm.io.FileContents.

Parameters
[in,out]self: The implicitly-passed input argument representing the parent object of the method.
[in]line: The input scalar MATLAB string or whole number, representing the line number within the file about which the warning message should be printed.
(optional, default = "UNKNOWN")
[in]msg: The input scalar MATLAB string containing a message to display on the MATLAB console.
(optional, default = "done in " + sprintf("%.6f", string(self.timer.del())) + " seconds.")


Possible calling interfaces

fc = pm.io.FileContents(file)
fc.warn(line, msg)
fc.warn([], msg)
fc.warn([], [])
fc.warn()


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, 6:07 PM, 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

Field Documentation

◆ file

Property FileContents::file

file

The scalar MATLAB string containing the path to the file whose contents are read.

Definition at line 45 of file FileContents.m.

◆ silent

Property FileContents::silent

silent

The scalar MATLAB logical (Boolean) indicator which is false by default.
If it is set to true, it will silence all output postprocessing messages.

Definition at line 38 of file FileContents.m.

◆ spinner

Property FileContents::spinner

spinner

The scalar Hidden MATLAB object of class pm.timing.Spinner used internally for displaying the progress in file contents processing.

Warning
This is an internal Hidden class attribute that is inaccessible to the end users.

Definition at line 72 of file FileContents.m.

◆ timer

Property FileContents::timer

timer

The scalar Hidden MATLAB object of class pm.timing.Timer used internally for displaying the timing of the progress in file contents processing.

Warning
This is an internal Hidden class attribute that is inaccessible to the end users.

Definition at line 84 of file FileContents.m.

◆ weblinks

Property FileContents::weblinks

weblinks

The scalar Hidden MATLAB struct returned by pm.lib.weblinks used internally for displaying the ParaMonte library web links.

Warning
This is an internal Hidden class attribute that is inaccessible to the end users.

Definition at line 60 of file FileContents.m.


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