NAMD
Public Member Functions | Public Attributes | List of all members
lssDistSort Struct Reference

Public Member Functions

 lssDistSort ()
 
 lssDistSort (int newType, Real newDist)
 
 lssDistSort (const lssDistSort &ref)
 
lssDistSortoperator= (const lssDistSort &ref)
 
bool operator== (const lssDistSort &ref)
 
bool operator< (const lssDistSort &ref)
 

Public Attributes

int type
 
Real dist
 
SortedArray< idIndxStridIndx
 

Detailed Description

Definition at line 241 of file ComputeQM.C.

Constructor & Destructor Documentation

lssDistSort::lssDistSort ( )
inline

Definition at line 248 of file ComputeQM.C.

References idIndx, and ResizeArray< T >::resize().

248  {
249  idIndx.resize(0);
250  };
SortedArray< idIndxStr > idIndx
Definition: ComputeQM.C:246
void resize(int i)
Definition: ResizeArray.h:84
lssDistSort::lssDistSort ( int  newType,
Real  newDist 
)
inline

Definition at line 251 of file ComputeQM.C.

References dist, idIndx, ResizeArray< T >::resize(), and type.

251  {
252  type = newType;
253  dist = newDist;
254  idIndx.resize(0);
255  }
SortedArray< idIndxStr > idIndx
Definition: ComputeQM.C:246
void resize(int i)
Definition: ResizeArray.h:84
lssDistSort::lssDistSort ( const lssDistSort ref)
inline

Definition at line 256 of file ComputeQM.C.

References dist, idIndx, SortedArray< Type >::insert(), ResizeArray< T >::resize(), ResizeArray< T >::size(), SortedArray< Type >::sort(), and type.

256  {
257  type = ref.type;
258  dist = ref.dist;
260  for (int i=0; i<ref.idIndx.size(); i++) idIndx.insert(ref.idIndx[i]) ;
261  idIndx.sort();
262  }
SortedArray< idIndxStr > idIndx
Definition: ComputeQM.C:246
int insert(const Elem &elem)
void sort(void)
Definition: SortedArray.h:66
void resize(int i)
Definition: ResizeArray.h:84
int size(void) const
Definition: ResizeArray.h:127

Member Function Documentation

bool lssDistSort::operator< ( const lssDistSort ref)
inline

Definition at line 291 of file ComputeQM.C.

References dist.

291 {return dist < ref.dist;}
lssDistSort& lssDistSort::operator= ( const lssDistSort ref)
inline

Definition at line 264 of file ComputeQM.C.

References dist, idIndx, SortedArray< Type >::insert(), ResizeArray< T >::resize(), ResizeArray< T >::size(), SortedArray< Type >::sort(), and type.

264  {
265  type = ref.type;
266  dist = ref.dist;
268  for (int i=0; i<ref.idIndx.size(); i++) idIndx.insert(ref.idIndx[i]) ;
269  idIndx.sort();
270 
271  return *this;
272  }
SortedArray< idIndxStr > idIndx
Definition: ComputeQM.C:246
int insert(const Elem &elem)
void sort(void)
Definition: SortedArray.h:66
void resize(int i)
Definition: ResizeArray.h:84
int size(void) const
Definition: ResizeArray.h:127
bool lssDistSort::operator== ( const lssDistSort ref)
inline

Definition at line 274 of file ComputeQM.C.

References dist, idIndx, ResizeArray< T >::size(), and type.

274  {
275  bool returnVal = true;
276 
277  if (! (type == ref.type && dist == ref.dist))
278  return false;
279 
280  if (idIndx.size() != ref.idIndx.size())
281  return false;
282 
283  for (int i=0; i<ref.idIndx.size(); i++) {
284  if (idIndx[i] != ref.idIndx[i])
285  return false;
286  }
287 
288  return returnVal;
289  }
SortedArray< idIndxStr > idIndx
Definition: ComputeQM.C:246
int size(void) const
Definition: ResizeArray.h:127

Member Data Documentation

Real lssDistSort::dist

Definition at line 243 of file ComputeQM.C.

Referenced by lssDistSort(), operator<(), operator=(), and operator==().

SortedArray<idIndxStr> lssDistSort::idIndx

Definition at line 246 of file ComputeQM.C.

Referenced by lssDistSort(), operator=(), and operator==().

int lssDistSort::type

Definition at line 242 of file ComputeQM.C.

Referenced by lssDistSort(), operator=(), and operator==().


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