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

Method FindMax

generator/cells_merger.cpp:190–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188}
189
190std::optional<m2::PointI> CellsMerger::FindMax() const
191{
192 m2::PointI max;
193 size_t sum = 0;
194 for (auto const & pair : m_matrix)
195 {
196 auto const cellSum = pair.second.GetSum();
197 if (cellSum > sum)
198 {
199 sum = cellSum;
200 max = pair.first;
201 }
202 }
203 return sum != 0 ? max : std::optional<m2::PointI>{};
204}
205
206m2::RectD CellsMerger::Union(m2::PointI const & startXy)
207{

Callers

nothing calls this directly

Calls 1

GetSumMethod · 0.80

Tested by

no test coverage detected