map-exts: Extensions to Data.Map

[ bsd3, data-structures, library, program ] [ Propose Tags ] [ Report a vulnerability ]

Extensions to Data.Map


[Skip to Readme]

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.1.0.1, 0.1.1.0, 0.2.0.0
Change log CHANGELOG.md
Dependencies base (>=4.7 && <5), bytestring, cassava, containers (>=0.5.8.1 && <0.6) [details]
License BSD-3-Clause
Copyright 2016 Elsen, Inc
Author Charles Cooper
Maintainer cooper.charles.m@gmail.com
Category Data Structures
Home page http://github.com/charles-cooper/map-exts#readme
Source repo head: git clone https://github.com/charles-cooper/map-exts
Uploaded by coopercm at 2018-01-10T00:05:13Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Executables titanic-example, example
Downloads 2643 total (0 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2018-01-10 [all 1 reports]

Readme for map-exts-0.2.0.0

[back to package description]

map-extensions

This module contains some extensions to Data.Map. Some of them are convenience functions.

It also contains functions to support a split-apply-combine workflow, by representing labeled, multi-dimensional data as multiply nested Maps. For instance, a two dimensional matrix with one axis indexed by 'Name's and the other axis labeled by 'Job's, we would represent such a structure with a Lookup2 Name Job Double. Such a structure is not terribly efficient (it takes O(n log(n)) space and O(log(n)) time for insert/update/delete operations with high constant factor owing to all the pointer manipulation), but it is expressive.

Here is the rough correspondence between split-apply-combine and the verbs used in this package:

split : groupBy

apply : fmap

combine : foldr/foldMap

reshape : transpose

For more information, see the examples.