bitvec all the things

This commit is contained in:
Folkert 2022-04-24 02:18:43 +02:00
parent b0ceaf0372
commit 452447232f
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
3 changed files with 88 additions and 67 deletions

View file

@ -40,6 +40,11 @@ impl ReferenceMatrix {
self.bitvec[index]
}
#[inline(always)]
pub fn get_row_col(&self, row: usize, col: usize) -> bool {
self.bitvec[row * self.length + col]
}
pub fn is_recursive(&self, index: usize) -> bool {
let mut scheduled = self.row_slice(index).to_bitvec();
let mut visited = self.row_slice(index).to_bitvec();