2%> Return the input hashmap with the
new (key, val) appended,
3%> only
if the input pair does not exist in the input hashmap.
5%> \param[in] key : The input scalar MATLAB
string
6%> containing the key to add to the input pair
list.
8%> \param[in] val : The input value to be appended to the
9%> input hashmap after the input ``key``.
11%> \param[in] hashmap : The input cell array of even number of elements
12%> containing a set of ``(key, val)`` pairs of the hashmap.
15%> `hashnew` : The output cell array of even number of elements
16%> containing the input pair
list and ``(key, val)`` pair.
17%> If the input ``key`` exists in the input ``hashmap``,
18%> the input ``(key, val)`` pair will not be added.
23%> hashnew = pm.matlab.hashmap.addKeyVal(key, val, hashmap)
28%> \include{lineno} example/matlab/hashmap/
addKeyVal/main.m
30%> \include{lineno} example/matlab/hashmap/
addKeyVal/main.out.m
35%> \JoshuaOsborne, May 21 2024, 10:39 PM, University of Texas at Arlington<br>
36%> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
37%> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute
for Computational Engineering and Sciences (ICES), UT Austin<br>
40 if 2 < nargin && 0 < length(hashnew)
41 [currentVal, failed] = pm.matlab.hashmap.getKeyVal(key, hashmap);
43 hashnew = {hashnew{:}, key, val};
46 hashnew = {key, val}; % XXX is
this correct behavior?
function list()
Return a list of MATLAB strings containing the names of OS platforms supported by the ParaMonte MATLA...
function addKeyVal(in key, in val, in hashmap)
Return the input hashmap with the new (key, val) appended, only if the input pair does not exist in t...