Posts

Showing posts from March, 2023

This code deletes n columns from ExSan(n, m) ---> ExSan(p, q-n)

Image
ExSan++ ExSan       1  /***********START***************/       2  //legend       3  // n: north   s: south  e: east  w: west  ptr: pointer       4  // This code deletes N columns from the data structure  ExSan       5  void Net::colDeleteNet(NETPTR net,   unsigned short deleteNcols) { // the number of deleted c       6            7     ROWPTR  rptr(nullptr);       8        9     if (net->get_net_cols() > 2) {      10        for (unsigned short col = 1; deleteNcols; col++) {      11           //opposite to insert               12           rptr = net->go_to_row(net, 1);      13           for (unsigned short row = 1; row <= net->get_net_rows(); row++) {//ok      14              rptr->get_backward_ptr()->get_previous_ptr()->set_next_ptr(nullptr);  //pending in inse      15              rptr->get_backward_ptr()->set_previous_ptr(nullptr);  //pending in insert      16       17              if (row == 1) {//ok  

This code adds one column to ExSan Grid // ExSan(n, m) ----> Exsan(n, m + 1)

Image
ExSan++       1  /***********START***************/       2  //This code adds one column to  ExSan Grid       3  // ExSan(n, m) ----> Exsan(n, m + 1)       1        2  /***********START***************/       3  void Net::colInsertNet(NETPTR net,       4                             unsigned short insertNcols, // ADD COLS       5                             ){       6     CELLPTR ptr(nullptr), newCell(nullptr);       7     ROWPTR  rptr(nullptr);       8        9     for (unsigned short col = 1; insertNcols; col++) {      10        rptr = net->go_to_row(net, 1);      11        for (unsigned short row = 1; row <= net->get_net_rows(); row++) {      12       13           newCell = newCell->create_cell(row, net->get_net_cols() + col);      14       15           newCell->set_previous_ptr(rptr->get_backward_ptr());      16           rptr->get_backward_ptr()->set_next_ptr(newCell);      17           rptr->set