ParaMonte MATLAB 3.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation. |
Go to the source code of this file.
Functions | |
function | hash2comp (in hashmap, in object, in insensitive, in extensible, in recursive) |
Return a copy of the input object whose property (or field) values are overwritten with the corresponding (key, val) pairs in the input hashmap cell array. More... | |
function hash2comp | ( | in | hashmap, |
in | object, | ||
in | insensitive, | ||
in | extensible, | ||
in | recursive | ||
) |
Return a copy of the input object
whose property (or field) values are overwritten with the corresponding (key, val)
pairs in the input hashmap
cell array.
This functionality is useful for converting the variadic arguments of functions to the corresponding property values of objects with the functions.
[in] | hashmap | : The input cell array of even number of elements containing the field names and values of the input object as (key, val) pairs stored sequentially as the cell elements.All keys in the input hashmap must already exist as fields/properties of the input object. |
[in] | object | : The input scalar MATLAB struct or object whose property/field values are to be overwritten with the corresponding values from the input hashmap cell. |
[in] | insensitive | : The input scalar MATLAB logical. If false , then keys within the input hashmap will be matched against the input object properties(or fields) case-sensitively.(optional, default = false ) |
[in] | extensible | : The input scalar MATLAB logical. If true , then keys in the input hashmap that are missing in the input object properties(or fields) will be added to output objnew .This functionality requires the input object to be either a MATLAB struct or an object whose ultimate superclass is the MATLAB handle class, which allows adding new properties via addprop() method.(optional, default = false ) |
[in] | recursive | : The input scalar MATLAB logical. If true , then key-val pairs in the input hashmap that match struct-cell or match object-cell pattern will be also converted recursively like the parent input object until all sub-components are obtained recursively.(optional, default = false ) |
hashmap
cell.
Possible calling interfaces ⛓
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.
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.