patch_sortop_curve_c Struct Reference

List of all members.

Public Member Functions

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

Public Attributes

PatchMappmap

Detailed Description

Definition at line 1994 of file WorkDistrib.C.


Constructor & Destructor Documentation

patch_sortop_curve_c::patch_sortop_curve_c ( PatchMap m  )  [inline]

Definition at line 1996 of file WorkDistrib.C.

01996 : pmap(m) {}


Member Function Documentation

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

Definition at line 1997 of file WorkDistrib.C.

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

01997                                                 {
01998     int a1 = pmap->index_c(p1);
01999     int a2 = pmap->index_c(p2);
02000     if ( a1 < a2 ) return true;
02001     if ( a1 > a2 ) return false;
02002     int dir = ( (a1 & 1) ? -1 : 1 );
02003     int b1 = pmap->index_a(p1);
02004     int b2 = pmap->index_a(p2);
02005     if ( b1 * dir < b2 * dir ) return true;
02006     if ( b1 * dir > b2 * dir ) return false;
02007     dir *= ( (b1 & 1) ? -1 : 1 );
02008     int c1 = pmap->index_b(p1);
02009     int c2 = pmap->index_b(p2);
02010     if ( c1 * dir < c2 * dir ) return true;
02011     return false;
02012   }


Member Data Documentation

PatchMap* patch_sortop_curve_c::pmap

Definition at line 1995 of file WorkDistrib.C.

Referenced by operator()().


The documentation for this struct was generated from the following file:
Generated on Sat Sep 23 01:17:20 2017 for NAMD by  doxygen 1.4.7