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

This is the base class for generating objects that can display the time spinner on the console.
More...

Inheritance diagram for Spinner:
Collaboration diagram for Spinner:

Public Member Functions

function Spinner ()
 Return a scalar object of class pm.timing.Spinner.
More...
 
function spin (in self, in fraction)
 Rotate the tick mark of the spinner and display the percentage value of the input fraction.
This is a dynamic method of the class pm.timing.Spinner.
More...
 

Data Fields

Property tickCount
 
Property format
 
Property clock
 

Protected Attributes

Property tickmarks
 

Detailed Description

This is the base class for generating objects that can display the time spinner on the console.

Developer Remark:
The handle superclass is essential to allow object modification by the object methods.
Note
See the documentation of the class constructor.
See below for information on the 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, 5:39 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 Spinner.m.

Constructor & Destructor Documentation

◆ Spinner()

function Spinner::Spinner ( )

Return a scalar object of class pm.timing.Spinner.

This is the constructor of the class pm.timing.Spinner.

Parameters
[in]tickmarks: The input MATLAB char vector containing the set of characters that represent the passage of time in the spinner.
(optional, default = '|/-\')
Returns
self : The output scalar object of class pm.timing.Spinner.


Possible calling interfaces

self = pm.timing.Spinner()


Example usage

1cd(fileparts(mfilename('fullpath'))); % Change working directory to source code directory.
2addpath('../../../'); % Add the ParaMonte library root directory to the search path.
3
4pm.matlab.show()
5pm.matlab.show('spinner = pm.timing.Spinner();')
6 spinner = pm.timing.Spinner();
7pm.matlab.show('for i = 1 : 10; spinner.spin(i/10); end')
8 for i = 1 : 10; spinner.spin(i/10); end
function root()
Return a scalar MATLAB string containing the root directory of the ParaMonte library package.

Example output
1
2spinner = pm.timing.Spinner();
3for i = 1 : 10; spinner.spin(i/10); end
4| 10% ␈␈␈␈␈␈␈/ 20% ␈␈␈␈␈␈␈- 30% ␈␈␈␈␈␈␈\ 40% ␈␈␈␈␈␈␈| 50% ␈␈␈␈␈␈␈/ 60% ␈␈␈␈␈␈␈- 70% ␈␈␈␈␈␈␈\ 80% ␈␈␈␈␈␈␈| 90% ␈␈␈␈␈␈␈| 100%


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, 5:43 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

Member Function Documentation

◆ spin()

function Spinner::spin ( in  self,
in  fraction 
)

Rotate the tick mark of the spinner and display the percentage value of the input fraction.
This is a dynamic method of the class pm.timing.Spinner.

Parameters
[in]fraction: The input scalar MATLAB fractional real (0 <= fraction <= 1) representing the fraction of work so far accomplished.


Possible calling interfaces

spinner = pm.timing.Spinner()
spinner.spin(fraction)


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, 5:45 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

Field Documentation

◆ clock

Property Spinner::clock

clock

The scalar integer representing the index of the tickmarks attribute.

Definition at line 60 of file Spinner.m.

◆ format

Property Spinner::format

format

The MATLAB char vector containing the spinner display format.

Definition at line 53 of file Spinner.m.

◆ tickCount

Property Spinner::tickCount

tickCount

The MATLAB integer containing the length of tickmarks.

Definition at line 46 of file Spinner.m.

◆ tickmarks

Property Spinner::tickmarks
protected

tickmarks

The MATLAB char vector containing the set of characters that represent the passage of time in the spinner.

Definition at line 36 of file Spinner.m.


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