Project

multimap

0.01
No commit activity in last 3 years
No release in over 3 years
Multimap includes a Ruby multimap implementation
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

Multimap¶ ↑

A Ruby multimap implementation that also includes multiset and nested multimap implementations.

Example¶ ↑

require 'multimap'

map = Multimap.new
map["a"] = 100
map["b"] = 200
map["a"] = 300

map["a"]                              # -> [100, 300]
map["b"]                              # -> [200]
map.keys                              # -> #<Multiset: {"a", "a", "b"}>