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

This is the abstract class for generating instances of objects that can contain basic attributes required for storing reference to a given data.
More...

Inheritance diagram for DataRef:
Collaboration diagram for DataRef:

Public Member Functions

function DataRef (in dfref)
 Generate an return an object of class DataRef from the input dataframe or its specified input reference.
More...
 
function copy (in self)
 Generate and return a copy of the data (or what is returned by the function handle) given the constructor of the parent object or the data return by the input.
More...
 

Protected Attributes

Property dfref
 

Detailed Description

This is the abstract class for generating instances of objects that can contain basic attributes required for storing reference to a given data.

This class is merely a convenience read-only wrapper to reference external data.

Remarks
See the constructor documentation for example usage.
Note
This class primarily exist to facilitate bypassing the lack of references and pointers in MATLAB.
See also
DataFrame


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, 4:45 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 DataRef.m.

Constructor & Destructor Documentation

◆ DataRef()

function DataRef::DataRef ( in  dfref)

Generate an return an object of class DataRef from the input dataframe or its specified input reference.

Parameters
[in]dfref: The input object containing the target dataset or function handle that takes no arguments and returns the dataset.
Specifying a function handle is superior to specifying the dataset directly, because the function handle will always allow the use of the most updated version of the user table or matrix.
(optional. default = [])
Returns
self : The output scalar object of class pm.data.DataRef.


Possible calling interfaces

df = pm.data.DataRef(dfref);
Property dfref
Definition: DataRef.m:41


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
4df = pm.data.DataRef()
5df.copy()
6
7data = randi([0, 9], 10, 5)
8df = pm.data.DataRef(data)
9df.copy()
10
11df = pm.data.DataRef(table(data))
12df.copy()
This is the abstract class for generating instances of objects that can contain basic attributes requ...
Definition: DataRef.m:27
function copy(in self)
Generate and return a copy of the data (or what is returned by the function handle) given the constru...
function root()
Return a scalar MATLAB string containing the root directory of the ParaMonte library package.

Example output
1df =
2 DataRef with no properties.
3ans =
4 []
5data =
6 9 3 2 1 6
7 5 1 7 5 2
8 1 2 7 4 6
9 1 6 3 0 6
10 2 4 5 3 7
11 8 3 0 1 4
12 2 8 0 7 0
13 8 5 5 3 2
14 2 5 7 5 9
15 9 9 9 1 1
16df =
17 DataRef with no properties.
18ans =
19 9 3 2 1 6
20 5 1 7 5 2
21 1 2 7 4 6
22 1 6 3 0 6
23 2 4 5 3 7
24 8 3 0 1 4
25 2 8 0 7 0
26 8 5 5 3 2
27 2 5 7 5 9
28 9 9 9 1 1
29df =
30 DataRef with no properties.
31ans =
32 10x1 table
33 data
34 _____________________
35 9 3 2 1 6
36 5 1 7 5 2
37 1 2 7 4 6
38 1 6 3 0 6
39 2 4 5 3 7
40 8 3 0 1 4
41 2 8 0 7 0
42 8 5 5 3 2
43 2 5 7 5 9
44 9 9 9 1 1


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, Tuesday March 7, 2017, 7:03 AM, Institute for Computational Engineering and Sciences (ICES), The University of Texas at Austin

Member Function Documentation

◆ copy()

function DataRef::copy ( in  self)

Generate and return a copy of the data (or what is returned by the function handle) given the constructor of the parent object or the data return by the input.

This class method offer the only way to access the user-specified data (reference).
The underlying logic behind the use of function to access the data (reference) originates from the lack of the concept of references (pointers) in the MATLAB computing language.

Returns
df : The output scalar MATLAB table a full copy of the data (reference) contained in the user-specified input dfref passed to the constructor of the parent object.


Possible calling interfaces

df = pm.data.DataRef(dfref);
dfcopy = df.copy();
Remarks
See the constructor documentation for example usage.


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, Friday May 17, 2014, 6:40 PM, The University of Texas at Arlington, Dallas, TX
Amir Shahmoradi, Tuesday March 7, 2017, 7:03 AM, Institute for Computational Engineering and Sciences (ICES), The University of Texas at Austin

Field Documentation

◆ dfref

Property DataRef::dfref
protected

dfref

A protected and Hidden copy of the user-specified input data (or its handle) dfref to the class constructor.
This is an exact copy of the user-specified function handle or data.
Users are supposed to access this component only via the class method pm.data.DataRef.copy().

Definition at line 41 of file DataRef.m.


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