Skip to content

Commit

Permalink
Add BMOC::new_allsky method
Browse files Browse the repository at this point in the history
  • Loading branch information
fxpineau committed Dec 11, 2023
1 parent 8b49fb0 commit 7f03e50
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/nested/bmoc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,12 @@ impl BMOC {
BMOC { depth_max, entries: Vec::with_capacity(capacity) }
}*/

pub fn new_allsky(depth: u8) -> Self {
let mut builder = BMOCBuilderUnsafe::new(depth, 12);
builder.push_all(0, 0, 11, true);
builder.to_bmoc()
}

pub fn size(&self) -> usize {
self.entries.len()
}
Expand Down

0 comments on commit 7f03e50

Please sign in to comment.