NAMD
Public Member Functions | List of all members
HashString Class Reference
Inheritance diagram for HashString:

Public Member Functions

int hash () const
 

Detailed Description

Definition at line 274 of file CompressPsf.C.

Member Function Documentation

int HashString::hash ( ) const
inline

Definition at line 276 of file CompressPsf.C.

276  {
277  const char* d = this->c_str();
278  int ret=0;
279  for (int i=0;d[i]!=0;i++) {
280  int shift1=((5*i)%16)+0;
281  int shift2=((6*i)%16)+8;
282  ret+=((0xa5^d[i])<<shift2)+(d[i]<<shift1);
283  }
284  return ret;
285  }

The documentation for this class was generated from the following file: