KerMor
0.9
Model order reduction for nonlinear dynamical systems and nonlinear approximation
|
FileDataCollection: Basic class for storing data given a hashable key value. More...
FileDataCollection: Basic class for storing data given a hashable key value.
This class is part of the framework
Homepage
http://www.morepas.org/software/index.htmlDocumentation
http://www.morepas.org/software/kermor/index.htmlLicense
KerMor license conditions Definition at line 18 of file FileDataCollection.m.
Public Member Functions | |
FileDataCollection (data_dir) | |
Creates a new FileDataCollection in a file folder. More... | |
function | delete () |
Destructor for FileDataCollection. More... | |
function struct data = | getData (rowvec< double > keydata, varargin) |
methods(Access=protected) Retrieves data from the collection element of a given key. More... | |
function n = | getCollectionSize () |
function struct data = | getDataNr (nr, varargin) |
Retrieves data from the nr-st collection element. More... | |
function res = | hasData (keydata) |
function | addData (keydata, data) |
function | clear () |
Public Member Functions inherited from data.FileData | |
FileData (data_dir) | |
function | relocate (char new_root) |
Relocates this FileData instance to a different folder. More... | |
function | delete () |
Static Public Member Functions | |
static function res = | test_FileDataCollection () |
Quickly tests if the directory is persisted(deleted) when (not) saved to a mat file. More... | |
Public Attributes | |
KeepFiles = false | |
Tells the FileDataCollection to keep any stored files if the instance is deleted but has not been previously saved. More... | |
Public Attributes inherited from data.FileData | |
char | Host = "" |
The host machine this file data is created on. More... | |
char | DataDirectory = "" |
The root folder where the FileData's files are saved. More... | |
Public Attributes inherited from handle | |
addlistener | |
Creates a listener for the specified event and assigns a callback function to execute when the event occurs. More... | |
notify | |
Broadcast a notice that a specific event is occurring on a specified handle object or array of handle objects. More... | |
delete | |
Handle object destructor method that is called when the object's lifecycle ends. More... | |
disp | |
Handle object disp method which is called by the display method. See the MATLAB disp function. More... | |
display | |
Handle object display method called when MATLAB software interprets an expression returning a handle object that is not terminated by a semicolon. See the MATLAB display function. More... | |
findobj | |
Finds objects matching the specified conditions from the input array of handle objects. More... | |
findprop | |
Returns a meta.property objects associated with the specified property name. More... | |
fields | |
Returns a cell array of string containing the names of public properties. More... | |
fieldnames | |
Returns a cell array of string containing the names of public properties. See the MATLAB fieldnames function. More... | |
isvalid | |
Returns a logical array in which elements are true if the corresponding elements in the input array are valid handles. This method is Sealed so you cannot override it in a handle subclass. More... | |
eq | |
Relational functions example. See details for more information. More... | |
transpose | |
Transposes the elements of the handle object array. More... | |
permute | |
Rearranges the dimensions of the handle object array. See the MATLAB permute function. More... | |
reshape | |
hanges the dimensions of the handle object array to the specified dimensions. See the MATLAB reshape function. More... | |
sort | |
ort the handle objects in any array in ascending or descending order. More... | |
Static Protected Member Functions | |
static function this = | loadobj (this, initfrom) |
Static Protected Member Functions inherited from data.FileData | |
static function this = | loadobj (this, initfrom) |
Loads a FileData instance. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from data.FileData | |
function file = | getfile (file) |
function this = | saveobj () |
Set saved flag so that the data files do not get deleted on the delete method. More... | |
Protected Attributes inherited from data.FileData | |
logical | isSaved = false |
This flag indicates that this FileData instance has been stored to disk via the save method somewhere. More... | |
data.FileDataCollection.FileDataCollection | ( | data_dir | ) |
Creates a new FileDataCollection in a file folder.
data_dir | Either a data.ModelData instance to infer the storage root from, or a string containing a valid folder. Default: A temporary folder within the KerMor.TempDirectory |
Definition at line 61 of file FileDataCollection.m.
References KerMor.App(), clear(), and IDGenerator.generateID().
function data.FileDataCollection.addData | ( | keydata, | |
data | |||
) |
Definition at line 171 of file FileDataCollection.m.
References data.FileData.DataDirectory, handle.fieldnames, and Utils.getHash().
Referenced by data.FileTrajectoryData.addTrajectory().
function data.FileDataCollection.clear | ( | ) |
Definition at line 187 of file FileDataCollection.m.
References data.FileData.getfile().
Referenced by data.FileTrajectoryData.clearTrajectories(), delete(), FileDataCollection(), and test_FileDataCollection().
function data.FileDataCollection.delete | ( | ) |
Destructor for FileDataCollection.
Deletes the DataDirectory if no trajectories are stored in it or it has not been saved somewhere.
Definition at line 84 of file FileDataCollection.m.
References clear(), data.FileData.isSaved, and KeepFiles.
function n = data.FileDataCollection.getCollectionSize | ( | ) |
Definition at line 137 of file FileDataCollection.m.
Referenced by data.FileTrajectoryData.getNumTrajectories().
methods(Access=protected) Retrieves data from the collection element of a given key.
keydata | The unique key data to identify a collection object |
varargin | Contains the name of the fields to obtain as strings |
data | A struct with the fields as specified in varargin. |
Definition at line 100 of file FileDataCollection.m.
References data.FileData.DataDirectory, data.FileData.getfile(), and Utils.getHash().
Referenced by data.FileTrajectoryData.consolidate(), and data.FileTrajectoryData.getTrajectory().
function struct data = data.FileDataCollection.getDataNr | ( | nr, | |
varargin | |||
) |
Retrieves data from the nr-st collection element.
nr | The element number |
varargin | Contains the name of the fields to obtain as strings |
data | A struct with the fields as specified in varargin. |
Definition at line 142 of file FileDataCollection.m.
References data.FileData.getfile().
Referenced by data.FileTrajectoryData.getTrajectoryNr().
function res = data.FileDataCollection.hasData | ( | keydata | ) |
Definition at line 162 of file FileDataCollection.m.
References data.FileData.DataDirectory, and Utils.getHash().
Referenced by data.FileTrajectoryData.addTrajectory().
|
staticprotected |
Definition at line 205 of file FileDataCollection.m.
|
static |
Quickly tests if the directory is persisted(deleted) when (not) saved to a mat file.
Definition at line 223 of file FileDataCollection.m.
References KerMor.App(), clear(), and k.
data.FileDataCollection.KeepFiles = false |
Tells the FileDataCollection to keep any stored files if the instance is deleted but has not been previously saved.
Default: false
Definition at line 49 of file FileDataCollection.m.
Referenced by delete().