| Crates.io | bitset-matrix |
| lib.rs | bitset-matrix |
| version | 0.1.0 |
| created_at | 2025-12-30 21:47:27.854073+00 |
| updated_at | 2025-12-30 21:47:27.854073+00 |
| description | Space-efficient, row-major 2D bitset matrix with fast bitwise ops |
| homepage | https://github.com/your-username/bitset-matrix |
| repository | https://github.com/your-username/bitset-matrix |
| max_upload_size | |
| id | 2013367 |
| size | 41,311 |
A compact, row-major 2D bitset matrix with fast bitwise operations across rows and columns.
Features
u64-backed storagesimd feature for accelerationQuick 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.