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

Method MakeFrozen

tools/poly_borders/help_structures.cpp:40–49  ·  view source on GitHub ↗

Polygon -----------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

38
39// Polygon -----------------------------------------------------------------------------------------
40void Polygon::MakeFrozen(size_t a, size_t b)
41{
42 CHECK_LESS(a, b, ());
43
44 // Ends of intervals shouldn't be frozen, we freeze only inner points: (a, b).
45 // This condition is needed to drop such cases: a = x, b = x + 1, when
46 // a + 1 will be greater than b - 1.
47 if (b - a + 1 > 2)
48 m_replaced.AddInterval(a + 1, b - 1);
49}
50
51bool Polygon::IsFrozen(size_t a, size_t b) const
52{

Callers 1

TryToReplaceMethod · 0.80

Calls 1

AddIntervalMethod · 0.45

Tested by

no test coverage detected