| 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()); |
| 220 | openparfAssert(0 <= y && y <= db_->layout().siteMap().height()); |
| 221 | auto ix = std::min(static_cast<IndexType>(x), layout_to_half_column_map.width() - 1); |
| 222 | auto iy = std::min(static_cast<IndexType>(y), layout_to_half_column_map.height() - 1); |
| 223 | return layout_to_half_column_map.at(ix, iy).ref().get().id(); |
| 224 | } |
| 225 | |
| 226 | std::vector<int32_t> PlaceDB::XyToSlrIndex(const int32_t &x, const int32_t &y) const { |
| 227 | std::vector<int32_t> XyIndex; |
no test coverage detected