| 141 | } |
| 142 | |
| 143 | bool compare (db::cell_index_type cell_a, db::cell_index_type cell_b) |
| 144 | { |
| 145 | if (cell_a != m_cell_a) { |
| 146 | |
| 147 | m_cell_a = cell_a; |
| 148 | |
| 149 | m_callers_a.clear (); |
| 150 | m_layout_a.cell (cell_a).collect_caller_cells (m_callers_a, *m_selection_cone_a, -1); |
| 151 | m_callers_a.insert (cell_a); |
| 152 | |
| 153 | m_trans.clear (); |
| 154 | insert (m_layout_a, m_initial_cell_a, m_cell_a, m_callers_a, m_trans, db::ICplxTrans ()); |
| 155 | |
| 156 | } |
| 157 | |
| 158 | m_repr_set = false; |
| 159 | |
| 160 | std::map<db::cell_index_type, db::ICplxTrans>::const_iterator r = m_repr.find (cell_b); |
| 161 | if (r != m_repr.end ()) { |
| 162 | m_repr_set = true; |
| 163 | if (m_trans.find (r->second) == m_trans.end ()) { |
| 164 | return false; |
| 165 | } |
| 166 | } |
| 167 | |
| 168 | std::set<db::cell_index_type> callers_b; |
| 169 | m_layout_b.cell (cell_b).collect_caller_cells (callers_b, *m_selection_cone_b, -1); |
| 170 | callers_b.insert (cell_b); |
| 171 | |
| 172 | trans_set_t trans (m_trans); |
| 173 | |
| 174 | double mag = m_layout_b.dbu () / m_layout_a.dbu (); |
| 175 | if (! compare (m_layout_b, m_initial_cell_b, cell_b, callers_b, trans, db::ICplxTrans (mag), db::ICplxTrans (1.0 / mag))) { |
| 176 | return false; |
| 177 | } |
| 178 | |
| 179 | return trans.empty (); |
| 180 | } |
| 181 | |
| 182 | void make_endpoint (db::cell_index_type /*cell_a*/, db::cell_index_type /*cell_b*/) |
| 183 | { |
no test coverage detected