bitset-matrix 0.1.0

Space-efficient, row-major 2D bitset matrix with fast bitwise ops
Documentation
  • Coverage
  • 96.43%
    27 out of 28 items documented0 out of 27 items with examples
  • Size
  • Source code size: 40.81 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 3.55 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 13s Average build duration of successful builds.
  • all releases: 13s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • mohtashimnawaz

bitset-matrix

A compact, row-major 2D bitset matrix with fast bitwise operations across rows and columns.

Features

  • Dense, row-major u64-backed storage
  • Fast row-wise block operations (SIMD feature available)
  • Column ops and iterators for convenience
  • Small, dependency-free core; optional simd feature for acceleration

Quick example: N-Queens helper

use bitset_matrix::BitMatrix;

// Example: for backtracking you'd store available columns as a row of bits
let mut m = BitMatrix::new(1, 8);
for c in 0..8 { m.set(0, c, true); }
// pick col 3
m.set(0, 3, false);

Quick example: Sudoku pencil marks

use bitset_matrix::BitMatrix;
// 9x9 board, each cell can have 1..9 candidates encoded per row per submatrix as needed
let mut board = BitMatrix::new(9, 9);
board.set(0, 0, true); // candidate marker

See examples/ for a runnable N-Queens example.