| 208 | } |
| 209 | |
| 210 | PlaceDB::IndexType PlaceDB::XyToCrIndex(const PlaceDB::CoordinateType &x, const PlaceDB::CoordinateType &y) const { |
| 211 | openparfAssert(0 <= x && x <= db_->layout().siteMap().width()); |
| 212 | openparfAssert(0 <= y && y <= db_->layout().siteMap().height()); |
| 213 | auto ix = std::min(static_cast<IndexType>(x), layout_to_clock_region_map.width() - 1); |
| 214 | auto iy = std::min(static_cast<IndexType>(y), layout_to_clock_region_map.height() - 1); |
| 215 | return layout_to_clock_region_map.at(ix, iy).ref().get().id(); |
| 216 | } |
| 217 | |
| 218 | PlaceDB::IndexType PlaceDB::XyToHcIndex(const PlaceDB::CoordinateType &x, const PlaceDB::CoordinateType &y) const { |
| 219 | openparfAssert(0 <= x && x <= db_->layout().siteMap().width()); |
no test coverage detected