https://github.com/osteele/sparseringbuffer.java
https://github.com/osteele/sparseringbuffer.java
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/osteele/sparseringbuffer.java
- Owner: osteele
- License: mit
- Created: 2022-10-28T09:51:51.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-30T11:23:24.000Z (over 3 years ago)
- Last Synced: 2025-06-11T01:03:58.314Z (about 1 year ago)
- Language: Java
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SpringRingBuffer.java
`SparseRingBuffer` implements a sparse list of integers stored in a fixed-size
ring buffer.
The buffer is sparse in time, not space: like a ring buffer, it uses fixed-size
arrays that are sized for the largest possible number of samples; but like a
linked list, each entry contains a pointer to the next populated entry, and is
possible to skip entries.
The class uses names from java.util.AbstractList and
java.util.AbstractCollection, but it does not implement those interfaces: first,
because it implements only the functionality that I have needed for my specific
use cases; second, because it is specalized to the `int` primitive type, which
is not possible at the time of this writing with Java generics.
I wrote this for , and ended up
developing this part of it outside of Processing so that I could use Java
development tools to develop the ring buffer class.
## License
Copyright (c) 2022 Oliver Steele.
Available under the MIT License.