| 34 | } |
| 35 | |
| 36 | std::pair<RegionSegmentId, CrossBorderSegment> ReadSegment(coding::CSVReader::Row const & tokens) |
| 37 | { |
| 38 | CHECK_EQUAL(tokens.size(), 8, ()); |
| 39 | |
| 40 | static size_t constexpr idxSegId = 0; |
| 41 | static size_t constexpr idxSegWeight = 1; |
| 42 | static size_t constexpr idxSegStart = 2; |
| 43 | static size_t constexpr idxSegEnd = 5; |
| 44 | |
| 45 | auto const segId = static_cast<RegionSegmentId>(std::stol(tokens[idxSegId])); |
| 46 | |
| 47 | CrossBorderSegment seg; |
| 48 | seg.m_weight = std::stod(tokens[idxSegWeight]); |
| 49 | seg.m_start = ReadSegmentEnding(tokens, idxSegStart); |
| 50 | seg.m_end = ReadSegmentEnding(tokens, idxSegEnd); |
| 51 | |
| 52 | return {segId, seg}; |
| 53 | } |
| 54 | |
| 55 | bool FillRoadsFromFile(CrossBorderGraph & graph, std::string const & roadsFilePath) |
| 56 | { |
no test coverage detected