[−][src]Struct dancing_links::grid::Grid
Dancing links grid, support efficient removal of rows and columns.
Implementations
impl Grid[src]
pub fn new(
num_columns: usize,
coordinates: impl IntoIterator<Item = (usize, usize)>
) -> Self[src]
num_columns: usize,
coordinates: impl IntoIterator<Item = (usize, usize)>
) -> Self
Create a new grid with a specified number of columns, and the given coordinates filled.
Rows and columns are based 1 indexed for this grid, matching the indexing notation for matrices in general.
pub fn to_dense(&self) -> Box<[Box<[bool]>]>[src]
Convert the grid to a dense representation.
This takes the original size of the grid, and only put true values for
locations that are still present in the grid (not covered).
pub fn uncovered_columns(&self) -> impl Iterator<Item = *const Column>[src]
Return an iterator of pointers to columns that are uncovered.
pub fn uncovered_columns_mut(&mut self) -> impl Iterator<Item = *mut Column>[src]
Return an iterator of mut pointers to columns that are uncovered.
pub fn all_columns_mut(
&mut self
) -> impl Iterator<Item = *mut Column> + DoubleEndedIterator + '_[src]
&mut self
) -> impl Iterator<Item = *mut Column> + DoubleEndedIterator + '_
Return an iterator over all columns that are in the grid (covered and uncovered).
pub fn get_column(&self, index: usize) -> Option<*const Column>[src]
Return a pointer to a specific Column, if it exists.
pub fn get_column_mut(&mut self, index: usize) -> Option<*mut Column>[src]
Return a mut pointer to a specific Column, if it exists.
pub fn is_empty(&self) -> bool[src]
Return true if there are no uncovered columns in the grid.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Grid
impl !Send for Grid
impl !Sync for Grid
impl Unpin for Grid
impl !UnwindSafe for Grid
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,