pub fn to_dense(&self) -> Box<[Box<[bool]>]> {
        let seen_coords = self.uncovered_columns().flat_map(|column_ptr| {
            let column_idx = Column::index(column_ptr);
            Column::row_indices(column_ptr).map(move |row_idx| (row_idx, column_idx))
        });

        let mut output = vec![false; self.num_columns * self.max_row];

        for (row_idx, column_idx) in seen_coords {
            output[(row_idx - 1) * self.num_columns + (column_idx - 1)] = true
        }

        if self.num_columns == 0 {
            debug_assert!(output.is_empty());

            vec![].into_boxed_slice()
        } else {
            output
                .as_slice()
                .chunks(self.num_columns)
                .map(Box::<[_]>::from)
                .collect()
        }
    }
/// 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).
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).
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 to_dense(&self) -> Box<[Box<[bool]>]> {
        let seen_coords = self.uncovered_columns().flat_map(|column_ptr| {
            let column_idx = Column::index(column_ptr);
            Column::row_indices(column_ptr).map(move |row_idx| (row_idx, column_idx))
        });
        let mut output = vec![false; self.num_columns * self.max_row];
        for (row_idx, column_idx) in seen_coords {
            output[(row_idx - 1) * self.num_columns + (column_idx - 1)] = true
        }
        if self.num_columns == 0 {
            debug_assert!(output.is_empty());
            vec![].into_boxed_slice()
        } else {
            output
                .as_slice()
                .chunks(self.num_columns)
                .map(Box::<[_]>::from)
                .collect()
        }
    }
pub fn to_dense ( & self ) -> Box < [ Box < [ bool ] > ] > { let seen_coords = self . uncovered_columns ( ) . flat_map ( | column_ptr | { let column_idx = Column :: index ( column_ptr ) ; Column :: row_indices ( column_ptr ) . map ( move | row_idx | ( row_idx , column_idx ) ) } ) ; let mut output = vec ! [ false self num_columns self max_row ] ; for ( row_idx , column_idx ) in seen_coords { output [ ( row_idx - 1 ) * self . num_columns + ( column_idx - 1 ) ] = true } if self . num_columns == 0 { debug_assert ! ( output is_empty ( ) ) ; vec ! [ ] . into_boxed_slice ( ) } else { output . as_slice ( ) . chunks ( self . num_columns ) . map ( Box :: < [ _ ] > :: from ) . collect ( ) } }
Convert the grid to a dense representation.
Convert the grid to a dense representation .
&self
&self