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

Function TestDecoding

libs/coding/geometry_coding.cpp:38–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36namespace coding
37{
38bool TestDecoding(InPointsT const & points, m2::PointU const & basePoint, m2::PointU const & maxPoint,
39 OutDeltasT const & deltas,
40 void (*fnDecode)(InDeltasT const & deltas, m2::PointU const & basePoint, m2::PointU const & maxPoint,
41 OutPointsT & points))
42{
43 size_t const count = points.size();
44
45 std::vector<m2::PointU> decoded;
46 decoded.resize(count);
47
48 OutPointsT decodedA(decoded);
49 fnDecode(make_read_adapter(deltas), basePoint, maxPoint, decodedA);
50
51 for (size_t i = 0; i < count; ++i)
52 ASSERT_EQUAL(points[i], decoded[i], ());
53 return true;
54}
55
56m2::PointU PredictPointInPolyline(m2::PointD const & maxPoint, m2::PointU const & p1, m2::PointU const & p2)
57{

Callers 3

EncodePolylinePrev1Function · 0.85
EncodePolylinePrev2Function · 0.85
EncodePolylinePrev3Function · 0.85

Calls 3

make_read_adapterFunction · 0.85
sizeMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected