MCPcopy Create free account
hub / github.com/comaps/comaps / GetFittingDirectionAndSize

Function GetFittingDirectionAndSize

libs/drape_frontend/transit_scheme_builder.cpp:1166–1184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1164}
1165
1166std::pair<m2::PointD, size_t> GetFittingDirectionAndSize(std::vector<ShapeInfoPT> const & shapeInfos)
1167{
1168 if (shapeInfos.empty())
1169 return {m2::PointD::Zero(), 0};
1170
1171 size_t idxMax = 0;
1172 size_t max = shapeInfos[0].m_colors.size();
1173
1174 for (size_t i = 1; i < shapeInfos.size(); ++i)
1175 {
1176 if (shapeInfos[i].m_colors.size() > max)
1177 {
1178 max = shapeInfos[i].m_colors.size();
1179 idxMax = i;
1180 }
1181 }
1182
1183 return {shapeInfos[idxMax].m_direction, max};
1184}
1185
1186std::pair<m2::PointD, size_t> GetFittingDirectionAndSize(std::vector<ShapeInfoPT> const & shapeInfosIn,
1187 std::vector<ShapeInfoPT> const & shapeInfosOut)

Callers 2

GenerateStopMethod · 0.85
GenerateTransferMethod · 0.85

Calls 3

ZeroFunction · 0.85
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected