csvbinmatrix 0.2.1

Binary matrix Compressed Sparse Vector
Documentation
# CSV Binary Matrix format Rust package

[![Crates.io](https://img.shields.io/crates/v/csvbinmatrix)](https://crates.io/crates/csvbinmatrix)
[![Coverage report](https://gitlab.com/vepain/csvbinmatrix-rust/badges/main/coverage.svg)](https://gitlab.com/vepain/csvbinmatrix-rust/-/commits/main)
[![Pipeline status](https://gitlab.com/vepain/csvbinmatrix-rust/badges/main/pipeline.svg)](https://gitlab.com/vepain/csvbinmatrix-rust/-/commits/main)
[![docs.rs](https://img.shields.io/docsrs/csvbinmatrix)](https://docs.rs/csvbinmatrix/latest/csvbinmatrix/)


## Quick usage

```rust
use csvbinmatrix::bincsv::BinCSV;

// Generate the following binary matrix:
// 0 0 0
// 0 0 1
// 0 1 1
// 1 1 1
let bin_csv =
    BinCSV::from_coordinates(4, 3, vec![(1, 2), (2, 1), (2, 2), (3, 0), (3, 1), (3, 2)]);

assert_eq!(bin_csv.number_of_rows(), 4);
assert_eq!(bin_csv.number_of_columns(), 3);

assert_eq!(bin_csv.number_of_ones(), 6);
assert_eq!(bin_csv.number_of_zeros(), 6);

bin_csv.write_to_file("mymatrix.csvbm").unwrap();

assert_eq!(BinCSV::read_from_file("mymatrix.csvbm").unwrap(), bin_csv);
```


## Recent Changes

See `CHANGELOG.md`.


## License

Dual-licensed to be compatible with the Rust project.

Licensed under the Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0 or the MIT license http://opensource.org/licenses/MIT, at your option. This file may not be copied, modified, or distributed except according to those terms.


## References

This package is based on this paper, where the authors' method is adapted for binary matrices:
> Farzaneh, Aiyoub, Hossein Kheırı, et Mehdi Abbaspour Shahmersı. « AN EFFICIENT STORAGE FORMAT FOR LARGE SPARSE MATRICES ». Communications Faculty of Sciences University of Ankara Series A1 Mathematics and Statistics 58, nᵒ 2 (1 août 2009): 1‑10. https://doi.org/10.1501/Commua1_0000000648.