MCPcopy Create free account
hub / github.com/davisking/dlib / order_rects

Function order_rects

dlib/test/max_sum_submatrix.cpp:22–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20// ----------------------------------------------------------------------------------------
21
22 bool order_rects (
23 const rectangle& a,
24 const rectangle& b
25 )
26 {
27 if (a.left() < b.left()) return true;
28 else if (a.left() > b.left()) return false;
29
30 if (a.right() < b.right()) return true;
31 else if (a.right() > b.right()) return false;
32
33 if (a.top() < b.top()) return true;
34 else if (a.top() > b.top()) return false;
35
36 if (a.bottom() < b.bottom()) return true;
37 else if (a.bottom() > b.bottom()) return false;
38
39 return false;
40 }
41
42 void run_test(
43 const int num

Callers

nothing calls this directly

Calls 4

leftMethod · 0.45
rightMethod · 0.45
topMethod · 0.45
bottomMethod · 0.45

Tested by

no test coverage detected