gmap
- negmas.generics.gmap(group: Callable[[Any], Any] | Mapping | Sequence, param: Any) Any[source]
Calls or indexes the group by the param
- Parameters:
group – Either a Callable or a Mapping
param – The parameters to use for mapping
Examples
>>> gmap([1, 23, 44], 1) 23 >>> gmap({"a": 3, "b": 5, "c": 4}, "c") 4 >>> gmap(lambda x: 3 * x, 20) 60
Returns: