multiset
Version, currently 0.5.08 versions
github.com/tcrouch/multiset.cr
Multiset (bag) data structure
4 stars
2 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
multiset:
github: tcrouch/multiset.cr
version: ~> 0.5.0Then run:
shards installshard.yml
- Crystal
>= 0.35.0- License
- MIT
- Author
- Tom Crouch
Dependencies
This version declares no dependencies.
README
multiset
A multiset (bag) implementation in Crystal.
Installation
Add this to your application's shard.yml:
dependencies:
multiset:
github: tcrouch/multiset.cr
Usage
require "multiset"
ms1 = Multiset{1, 1}
ms1 << 2 # => Multiset{1, 1, 2}
ms1.merge [3, 4] # => Multiset{1, 1, 2, 3, 4}
ms2 = Multiset.new [2, 3, 4]
ms2.subset_of?(ms1) # => true
ms1 & ms2 # => Multiset{2, 3, 4}
Development
crystal spec
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- [tcrouch] Tom Crouch - creator, maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.5.0- Tagged
- Jul 31, 2021
- Commit
ffaa838f7dd7- Crystal
>= 0.35.0- Indexed
- yes
Dependents
Repository
github.com/tcrouch/multiset.cr
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 14, 2026
- Versions
- 8