patch_sortop_curve_a Struct Reference

List of all members.

Public Member Functions

 patch_sortop_curve_a (PatchMap *m)
bool operator() (int p1, int p2) const

Public Attributes

PatchMappmap

Detailed Description

Definition at line 1954 of file WorkDistrib.C.


Constructor & Destructor Documentation

patch_sortop_curve_a::patch_sortop_curve_a ( PatchMap m  )  [inline]

Definition at line 1956 of file WorkDistrib.C.

01956 : pmap(m) {}


Member Function Documentation

bool patch_sortop_curve_a::operator() ( int  p1,
int  p2 
) const [inline]

Definition at line 1957 of file WorkDistrib.C.

References PatchMap::index_a(), PatchMap::index_b(), PatchMap::index_c(), and pmap.

01957                                                 {
01958     int a1 = pmap->index_a(p1);
01959     int a2 = pmap->index_a(p2);
01960     if ( a1 < a2 ) return true;
01961     if ( a1 > a2 ) return false;
01962     int dir = ( (a1 & 1) ? -1 : 1 );
01963     int b1 = pmap->index_b(p1);
01964     int b2 = pmap->index_b(p2);
01965     if ( b1 * dir < b2 * dir ) return true;
01966     if ( b1 * dir > b2 * dir ) return false;
01967     dir *= ( (b1 & 1) ? -1 : 1 );
01968     int c1 = pmap->index_c(p1);
01969     int c2 = pmap->index_c(p2);
01970     if ( c1 * dir < c2 * dir ) return true;
01971     return false;
01972   }


Member Data Documentation

PatchMap* patch_sortop_curve_a::pmap

Definition at line 1955 of file WorkDistrib.C.

Referenced by operator()().


The documentation for this struct was generated from the following file:
Generated on Thu Nov 23 01:17:19 2017 for NAMD by  doxygen 1.4.7