pub enum Group {
Box(Vec<Option<Element>>),
Stack(Vec<Option<Element>>),
Band(Vec<Option<Element>>),
}
Expand description
A subdivision of the main sudoku; the smallest grouping to which rules are applied.
Variants§
Box(Vec<Option<Element>>)
A square set of elements.
A subdivision of a sudoku.
§Rule
Each box may contain each element value only once.
Stack(Vec<Option<Element>>)
A vertical set of elements.
A subdivision of a sudoku.
§Rule
Each stack may contain each element value only once.
Band(Vec<Option<Element>>)
Implementations§
Source§impl Group
impl Group
Sourcepub fn is_valid(&self) -> bool
pub fn is_valid(&self) -> bool
Whether a group is valid (contains no errors).
A group is considered valid if it contains only unique elements (ignoring empty elements).
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Whether a group is complete.
A group is considered complete if it contains every possible element value exactly once.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Group
impl RefUnwindSafe for Group
impl Send for Group
impl Sync for Group
impl Unpin for Group
impl UnwindSafe for Group
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more