﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	revision
320	Map utilities	Peter Kovacs	Peter Kovacs	"It would be nice to have some functions to make it easier to work with graph maps.

I could imagine the following functions (similarly to STL tools in `<algorithm>`). Let `K` and `V` denote the `Key` and `Value` type of `Map`.
 - `K mapMin(Map)`, `K mapMin(Map, Comp)`
 - `K mapMax(Map)`, `K mapMax(Map, Comp)`
 - `V mapMinValue(Map)`, `V mapMinValue(Map, Comp)`
 - `V mapMaxValue(Map)`, `V mapMaxValue(Map, Comp)`
 - `K mapFind(Map, V)`, `K mapFindIf(Map, Cond)`
 - `int mapCount(Map, V)`, `int mapCountIf(Map, Cond)`
 - `void mapFill(Map, V)`
 - `void mapReplace(Map, V, V)`

 - `bool mapCompare(Map1, Map2)`
 - `void mapCopy(Map1, Map2)` (see also #146)

 - And maybe: `V mapSum(Map)`, `V mapSum(Map, V init)`

Some of these names could be misleading, e.g. `mapReplace` or `mapCount`, since they operate on map values, not maps. On the other hand, `mapCompare` and `mapCopy` would operate on maps.

Since the standard graph maps have iterator classes to traverse the corresponding item set, these functions could be implemented easily. However if we would like to support all maps whose key type is the `Node`, `Arc` or `Edge` type of graph, than we should provide overloaded versions that take the graph as well, e.g. `mapMin(Map, Graph)`. But it could be confusing if we also have `mapMin(Map, Comp)` and `mapMin(Map, Graph, Comp)`.
"	enhancement	closed	major	LEMON 1.2 release	core	hg main	done			
