HashReal Class Reference

List of all members.

Public Member Functions

 HashReal (Real v)
 operator Real & ()
 operator const Real & () const
int hash () const

Detailed Description

Definition at line 288 of file CompressPsf.C.


Constructor & Destructor Documentation

HashReal::HashReal ( Real  v  )  [inline]

Definition at line 291 of file CompressPsf.C.

00291 : val(v) {}


Member Function Documentation

int HashReal::hash (  )  const [inline]

Definition at line 295 of file CompressPsf.C.

00295                    {
00296     const char* d = (const char *)&val;
00297     int ret=0;
00298     for (int i=0;i < sizeof(Real);i++) {
00299       int shift1=((5*i)%16)+0;
00300       int shift2=((6*i)%16)+8;
00301       ret+=((0xa5^d[i])<<shift2)+(d[i]<<shift1);
00302     }
00303     return ret;
00304   };

HashReal::operator const Real & (  )  const [inline]

Definition at line 293 of file CompressPsf.C.

00293 { return val; }

HashReal::operator Real & (  )  [inline]

Definition at line 292 of file CompressPsf.C.

00292 { return val; }


The documentation for this class was generated from the following file:
Generated on Wed Nov 22 01:17:21 2017 for NAMD by  doxygen 1.4.7