/* contract the box of the cell c , try to find a new loup :; push the cell in the heap or if the contraction makes the box empty, delete the cell */ void Optimizer::handle_cell(Cell& c, const IntervalVector& init_box) { try { contract_and_bound(c, init_box); // may throw EmptyBoxException buffer.push(&c); nb_cells++; } catch(EmptyBoxException&) { delete &c; } }
void Optimizer::handle_cell(Cell& c, const IntervalVector& init_box ){ contract_and_bound(c, init_box); if (c.box.is_empty()) { delete &c; } else { // objshaver->contract(c.box); // we know cost1() does not require OptimData buffer.cost2().set_optim_data(c,sys); // the cell is put into the 2 heaps buffer.push(&c); nb_cells++; } }