Lexicographical order by indices of start end end point of the edge
Definition at line 27 of file Mesh.h.
Public Member Functions | |
edge_comp () | |
bool | operator() (const Edge *e1, const Edge *e2) const |
|
Definition at line 28 of file Mesh.h.
|
|
Definition at line 29 of file Mesh.h. 00029 { 00030 int b1 = e1->vertex->ID, t1 = e1->pair->vertex->ID; 00031 int b2 = e2->vertex->ID, t2 = e2->pair->vertex->ID; 00032 00033 int min1, min2, max1, max2; 00034 min1 = std::min(b1, t1); min2 = std::min(b2, t2); 00035 max1 = std::max(b1, t1); max2 = std::max(b2, t2); 00036 if (min1 == min2 && max1 == max2){ 00037 if (b1 < b2) return true; 00038 return (b1 == b2 && t1 < t2); 00039 } 00040 if (min1 < min2) return true; 00041 return (min1 == min2 && max1 < max2); 00042 }
|