fn make_new_cell_with_category_(
        &mut self,
        cell_id: CellIndex, // same as sorted_index
        initial_index: SourceIndex,
        sc: ColorBits,
    ) -> CellIndex {
        // fill cell with temporary blocks- they will be over-written later
        // Todo: fix this dirty hack with Option<>
        while self.cells_.len() < cell_id.0 {
            self.cells_.push(Rc::new(cell::Cell::new(Cell::<I, F>::new(
                CellIndex(usize::MAX),
                usize::MAX,
                ColorBits::TEMPORARY_CELL.0,
            ))));
        }
        self.cells_.push(Rc::new(cell::Cell::new(Cell::<I, F>::new(
            cell_id,
            initial_index,
            sc.0,
        ))));
        #[cfg(feature = "console_debug")]
        assert_eq!(self.cells_[cell_id.0].get().id().0, cell_id.0);

        let ccell = &self.cells_[cell_id.0];
        {
            let cell = ccell.get();
            #[cfg(feature = "console_debug")]
            {
                assert_eq!(cell.id_.0, cell_id.0);
                assert_eq!(cell.source_index_, initial_index);
                assert_eq!(cell.color_, sc.0);
            }
            //cell.color_ = sc.get_value();
            ccell.set(cell);
        }
        cell_id
    }
/// push a new cell on the output. Nothing but id and source category is initialized
push a new cell on the output. Nothing but id and source category is initialized
push a new cell on the output . Nothing but id and source category is initialized
fn make_new_cell_with_category_(
        &mut self,
        cell_id: CellIndex, // same as sorted_index
        initial_index: SourceIndex,
        sc: ColorBits,
    ) -> CellIndex {
        // fill cell with temporary blocks- they will be over-written later
        // Todo: fix this dirty hack with Option<>
        while self.cells_.len() < cell_id.0 {
            self.cells_.push(Rc::new(cell::Cell::new(Cell::<I, F>::new(
                CellIndex(usize::MAX),
                usize::MAX,
                ColorBits::TEMPORARY_CELL.0,
            ))));
        }
        self.cells_.push(Rc::new(cell::Cell::new(Cell::<I, F>::new(
            cell_id,
            initial_index,
            sc.0,
        ))));
        #[cfg(feature = "console_debug")]
        assert_eq!(self.cells_[cell_id.0].get().id().0, cell_id.0);
        let ccell = &self.cells_[cell_id.0];
        {
            let cell = ccell.get();
            #[cfg(feature = "console_debug")]
            {
                assert_eq!(cell.id_.0, cell_id.0);
                assert_eq!(cell.source_index_, initial_index);
                assert_eq!(cell.color_, sc.0);
            }
            //cell.color_ = sc.get_value();
            ccell.set(cell);
        }
        cell_id
    }
fn make_new_cell_with_category_ ( & mut self , cell_id : CellIndex , // same as sorted_index initial_index : SourceIndex , sc : ColorBits , ) -> CellIndex { // fill cell with temporary blocks- they will be over-written later // Todo: fix this dirty hack with Option<> while self . cells_ . len ( ) < cell_id . 0 { self . cells_ . push ( Rc :: new ( cell :: Cell :: new ( Cell :: < I , F > :: new ( CellIndex ( usize :: MAX ) , usize :: MAX , ColorBits :: TEMPORARY_CELL . 0 , ) ) ) ) ; } self . cells_ . push ( Rc :: new ( cell :: Cell :: new ( Cell :: < I , F > :: new ( cell_id , initial_index , sc . 0 , ) ) ) ) ; # [ cfg ( feature " " ) ] assert_eq ! ( self cells_ [ cell_id 0 ] get ( ) id ( ) 0 cell_id 0 ) ; let ccell = & self . cells_ [ cell_id . 0 ] ; { let cell = ccell . get ( ) ; # [ cfg ( feature " " ) ] { assert_eq ! ( cell id_ 0 cell_id 0 ) ; assert_eq ! ( cell source_index_ initial_index ) ; assert_eq ! ( cell color_ sc 0 ) ; } //cell.color_ = sc.get_value(); ccell . set ( cell ) ; } cell_id }
push a new cell on the output.
push a new cell on the output .
&mut self
cell_id
CellIndex
initial_index
SourceIndex
sc
ColorBits