#data-structures #chunk #list #run-time #operations #structure

bin+lib chunklist

A Chunk List is a new, concurrent, chunk-based data structure that is easily modifiable and allows for fast runtime operations

1 unstable release

new 0.1.0 Jan 15, 2025

#265 in Concurrency

Apache-2.0

16KB
203 lines

Crate CI/CT/CD License DOI

About

A Chunk List is a new, concurrent, chunk-based data structure that is easily modifiable and allows for fast runtime operations.

To find out more, check out the provided research paper in the original C# implementation repo:

Installation

Install the chunklist Cargo crate:

cargo add chunklist

Or, in Cargo.toml:

[dependencies]
chunklist = "0.1.0"

Usage

use chunklist::ChunkList;

fn main() {
    println!("Hello, world!");
    let mut chunklist = ChunkList::new(25);
    let mut rng = rand::thread_rng();
    for _ in 0..250 {
        let value = rng.gen_range(0..1000);
        chunklist.add(value);
    }
    chunklist.sort();
    chunklist.print();
    println!("Length: {}", chunklist.len());
    println!("List contains 500: {}\n", chunklist.contains(&500));
}

The Presentation folder (i.e., the research paper) in the original C# implementation repo contains a full presentation and research paper in PDF format, containing the following information:

  • What is a chunk list?
  • Where is a chunk list used?
  • Implementation details (construction, basic methods)
  • Complexity Analysis (Big-O)
  • Unit Testing
  • Integration

Program files are kept within the main branch.

A full implementation of the class is kept within the chunklist.rs file in the module chunklist, to be included within the program.

The tests/chunklist_tests.rs file contains a benchmark test for comparison between a Vector and Chunk List.

Bugs/Features

Bugs are tracked using the GitHub Issue Tracker.

Please use the issue tracker for the following purpose:

  • To raise a bug request; do include specific details and label it appropriately.
  • To suggest any improvements in existing features.
  • To suggest new features or structures or applications.

License

The code is licensed under Apache License 2.0.

Citation

If you use this code for your research, please cite this project:

@software{Szelogowski_Chunk-List_2017,
 author = {Szelogowski, Daniel},
 doi = {10.48550/arxiv.2101.00172},
 month = {May},
 title = {{Chunk-List}},
 license = {Apache-2.0},
 url = {https://github.com/danielathome19/Chunk-List-rs},
 version = {1.0.0},
 year = {2017}
}

Dependencies

~1.5MB
~30K SLoC