[commit: containers] master: Add IntMap.mapKeys* methods. (4ee54fe)
Paolo Capriotti
p.capriotti at gmail.com
Tue May 8 00:54:57 CEST 2012
Repository : ssh://darcs.haskell.org//srv/darcs/packages/containers
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/4ee54fe619c5aba38f4ca3a38a4fc793ce1c759a
>---------------------------------------------------------------
commit 4ee54fe619c5aba38f4ca3a38a4fc793ce1c759a
Author: Milan Straka <fox at ucw.cz>
Date: Wed Dec 7 20:42:10 2011 +0100
Add IntMap.mapKeys* methods.
Add IntMap.mapKeys, mapKeysWith, mapKeysMonotonic.
These functions are present in the Map module and we want IntMap
to be a replacement of Map Int.
The IntMap.mapKeysMonotonic is not as efficient as Map.mapKeysMonotonic
because of the IntMap representation -- the trie structure changes
wildly when the keys changes, even if the ordering of keys is not
altered.
Also, some time complexities were corrected.
Data/IntMap/Base.hs | 85 ++++++++++++++++++++++++++++++++++++++----------
Data/IntMap/Lazy.hs | 3 ++
Data/IntMap/Strict.hs | 17 ++++++++++
3 files changed, 87 insertions(+), 18 deletions(-)
Diff suppressed because of size. To see it, use:
git show 4ee54fe619c5aba38f4ca3a38a4fc793ce1c759a
More information about the Cvs-libraries
mailing list