sparse_array

SparseArray

A SparseArray maps integers to generic types. It allows gaps in incices, just like a Hash, but in a memory efficient manner. It is slower than a Hash though.

TODO:

  • Support deletion
  • Support Enumerable/Iterable
  • dup/clone
  • to_s/inspect

Installation

Add this to your application's shard.yml:

dependencies:
  sparse_array:
    github: rumenzu/sparse_array

Usage

require "sparse_array"

Contributing

  1. Fork it ( https://github.com/rumenzu/sparse_array/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • rumenzu Romain Franceschini - creator, maintainer
Repository

sparse_array

Owner
Statistic
  • 1
  • 0
  • 0
  • 0
  • 0
  • over 6 years ago
  • May 8, 2018
License

MIT License

Links
Synced at

Thu, 21 Nov 2024 04:39:27 GMT

Languages