https://github.com/meooow25/seqn
Sequences and measured sequences with logarithmic time index, split, append
https://github.com/meooow25/seqn
haskell
Last synced: 10 months ago
JSON representation
Sequences and measured sequences with logarithmic time index, split, append
- Host: GitHub
- URL: https://github.com/meooow25/seqn
- Owner: meooow25
- License: bsd-3-clause
- Created: 2024-06-09T22:11:46.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-07-12T16:48:53.000Z (over 1 year ago)
- Last Synced: 2025-03-21T22:39:13.796Z (11 months ago)
- Topics: haskell
- Language: Haskell
- Homepage:
- Size: 98.6 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# seqn
[](https://hackage.haskell.org/package/seqn)
[](https://github.com/meooow25/seqn/actions/workflows/haskell-ci.yml)
`seqn` offers two sequence types:
* `Seq`, an immutable sequence supporting operations such as index, insert,
delete, split, append, in logarithmic time. `Seq` is well-suited to use cases
where there are frequent changes to the structure of the sequence.
* `MSeq`, a sequence like `Seq`, which additionally supports constant time
access to the accumulated "measure" of all its elements. See the documentation
for `MSeq` for more about measures.
`seqn` also offers a priority-queue structure, `PQueue`, with logarithmic time
queue operations.
## Documentation
Please find the documentation on Hackage: [seqn](https://hackage.haskell.org/package/seqn)
## Alternatives
The following structures are similar to `Seq` and `MSeq`, but may be better
suited to some use cases.
* Alternatives to `Seq`:
* [`Data.Sequence.Seq`](https://hackage.haskell.org/package/containers-0.7/docs/Data-Sequence.html#t:Seq)
from `containers`
* [`Data.RRBVector.Vector`](https://hackage.haskell.org/package/rrb-vector-0.2.1.0/docs/Data-RRBVector.html#t:Vector)
from `rrb-vector`
* Alternatives to `MSeq`:
* [`Data.FingerTree.FingerTree`](https://hackage.haskell.org/package/fingertree-0.1.5.0/docs/Data-FingerTree.html#t:FingerTree)
from `fingertree`
For a detailed comparison, [see here](https://github.com/meooow25/seqn/tree/master/bench).
## Acknowledgements
The interface and implementation of `seqn` is largely influenced by
the libraries [`containers`](https://hackage.haskell.org/package/containers) and
[`fingertree`](https://hackage.haskell.org/package/fingertree).
## Contributing
Questions, bug reports, documentation improvements, code contributions welcome!
Please [open an issue](https://github.com/meooow25/seqn/issues) as the first
step.