Skip to content

containers.Map

containers · scripts/+containers/Map.m

containers.Map: dictionary object associating keys with values.

M = containers.Map () M = containers.Map (KEYS, VALUES) M = containers.Map (KEYS, VALUES, ’UniformValues’, TF) M = containers.Map (’KeyType’, KT, ’ValueType’, VT) M = containers.Map ("KeyType", "char", "ValueType", "double")

Keys are character rows or real numeric scalars. Index with M(KEY), assign with M(KEY) = VALUE, and use KEYS, VALUES, ISKEY, REMOVE, LENGTH and the read-only properties Count, KeyType and ValueType. A Map is a handle: copies of the variable refer to the same object.