sparseset
Sparsets for Nim
Summary
| Latest Version | Unknown |
|---|---|
| License | MIT |
| CI Status | Passing |
| Downloads | 0 |
| Last Indexed | 2026-07-21 05:24 |
Tags
Installation
nimble install sparseset
choosenim install sparseset
git clone https://github.com/planetis-m/sparseset
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| sparseset | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Source
| Repository | https://github.com/planetis-m/sparseset |
|---|---|
| Homepage | https://github.com/planetis-m/sparseset |
| Documentation | View Documentation |
| Registry Source | nimble_official |
README
Sparsesets for Nim
var s = initSparseSet[uint16, int](128) # capacity of sparse and dense data
assert s.len == 0
let ent1 = 1'u16
let ent2 = 2'u16
s[ent1] = 5
s[ent2] = 4
assert(s.len == 2)
s.sort(cmp)
s[ent1] = 5
s[ent2] = 4