Help | Examples | About | API | Blog | Hackage | Haskell
Concurrently search more than 6377 packages and more than 599194 functions! (Index generated: Tue, 22 Apr 2014 14:04:47 UTC )
Found 251 functions, 0 packages and 37 completions.
Top 15 Modules
Data 251
Top 15 Packages
Data.Map.Map:: module
containers

Note: You should use Data.Map.Strict instead of this module if:

  • You will eventually need all the values stored.
  • The stored values don't represent large virtual data structures to be lazily computed.

An efficient implementation of ordered maps from keys to values (dictionaries).

These modules are intended to be imported qualified, to avoid name clashes with Prelude functions, e.g.

  import qualified Data.Map as Map

The implementation of Map is based on size balanced binary trees (or trees of bounded balance) as described by:

  • Stephen Adams, "Efficient sets: a balancing act", Journal of Functional Programming 3(4):553-562, October 1993, http://www.swiss.ai.mit.edu/~adams/BB/.
  • J. Nievergelt and E.M. Reingold, "Binary search trees of bounded balance", SIAM journal of computing 2(1), March 1973.

Note that the implementation is left-biased -- the elements of a first argument are always preferred to the second, for example in union or insert.

Operation comments contain the operation time complexity in the Big-O notation (http://en.wikipedia.org/wiki/Big_O_notation).

Source
Data.Map.Strict.map:: (a -> b) -> Map k a -> Map k b
containers

O(n). Map a function over all values in the map.

 map (++ "x") (fromList [(5,"a"), (3,"b")]) == fromList [(3, "bx"), (5, "ax")]
Source
Data.Map.Lazy.map:: (a -> b) -> Map k a -> Map k b
containers

O(n). Map a function over all values in the map.

 map (++ "x") (fromList [(5,"a"), (3,"b")]) == fromList [(3, "bx"), (5, "ax")]
Source
Data.Set.map:: (a -> b) -> Set a -> Set b
containers
No description.
Source
Data.IntSet.map:: (Key -> Key) -> IntSet -> IntSet
containers
No description.
Source
Data.IntMap.Strict.map:: (a -> b) -> IntMap a -> IntMap b
containers

O(n). Map a function over all values in the map.

 map (++ "x") (fromList [(5,"a"), (3,"b")]) == fromList [(3, "bx"), (5, "ax")]
Source
Data.IntMap.Lazy.map:: (a -> b) -> IntMap a -> IntMap b
containers

O(n). Map a function over all values in the map.

 map (++ "x") (fromList [(5,"a"), (3,"b")]) == fromList [(3, "bx"), (5, "ax")]
Source
Data.Map.Strict.Map:: data
containers

A Map from keys k to values a.

Source
Data.Map.Lazy.Map:: data
containers

A Map from keys k to values a.

Source
Data.IntMap.IntMap:: module
containers

An efficient implementation of maps from integer keys to values (dictionaries).

This module re-exports the value lazy Data.IntMap.Lazy API, plus several deprecated value strict functions. Please note that these functions have different strictness properties than those in Data.IntMap.Strict: they only evaluate the result of the combining function. For example, the default value to insertWith' is only evaluated if the combining function is called and uses it.

These modules are intended to be imported qualified, to avoid name clashes with Prelude functions, e.g.

  import Data.IntMap (IntMap)
  import qualified Data.IntMap as IntMap

The implementation is based on big-endian patricia trees. This data structure performs especially well on binary operations like union and intersection. However, my benchmarks show that it is also (much) faster on insertions and deletions when compared to a generic size-balanced map implementation (see Data.Map).

  • Chris Okasaki and Andy Gill, "Fast Mergeable Integer Maps", Workshop on ML, September 1998, pages 77-86, http://citeseer.ist.psu.edu/okasaki98fast.html
  • D.R. Morrison, "/PATRICIA -- Practical Algorithm To Retrieve Information Coded In Alphanumeric/", Journal of the ACM, 15(4), October 1968, pages 514-534.

Operation comments contain the operation time complexity in the Big-O notation http://en.wikipedia.org/wiki/Big_O_notation. Many operations have a worst-case complexity of O(min(n,W)). This means that the operation can become linear in the number of elements with a maximum of W -- the number of bits in an Int (32 or 64).

Source
Powered by Haskell, HXT, Snap, and
Please send any feedback to hayoo@holumbus.org