From 7f03e50f028caee4fe2d3a8d8d8e72ca056f5962 Mon Sep 17 00:00:00 2001 From: fxpineau Date: Mon, 11 Dec 2023 11:52:52 +0100 Subject: [PATCH] Add BMOC::new_allsky method --- src/nested/bmoc.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/nested/bmoc.rs b/src/nested/bmoc.rs index 4b4c8e5..cc3a512 100644 --- a/src/nested/bmoc.rs +++ b/src/nested/bmoc.rs @@ -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() }