Mesh::edge_comp Struct Reference

List of all members.

Detailed Description

Comparison functions for edge sets.

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


Constructor & Destructor Documentation

Mesh::edge_comp::edge_comp  )  [inline]
 

Definition at line 28 of file Mesh.h.

00028 {}


Member Function Documentation

bool Mesh::edge_comp::operator() const Edge e1,
const Edge e2
const [inline]
 

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       }


The documentation for this struct was generated from the following file:
Generated on Sat Jun 3 13:33:43 2006 for CirclePatterns by  doxygen 1.4.5