lssDistSort Struct Reference

List of all members.

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< Elem >::resize().

00248                   {
00249         idIndx.resize(0);
00250     };

lssDistSort::lssDistSort ( int  newType,
Real  newDist 
) [inline]

Definition at line 251 of file ComputeQM.C.

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

00251                                            {
00252         type = newType;
00253         dist = newDist;
00254         idIndx.resize(0);
00255     }

lssDistSort::lssDistSort ( const lssDistSort ref  )  [inline]

Definition at line 256 of file ComputeQM.C.

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

00256                                         {
00257         type = ref.type;
00258         dist = ref.dist;
00259         idIndx.resize(idIndx.size());
00260         for (int i=0; i<ref.idIndx.size(); i++) idIndx.insert(ref.idIndx[i]) ;
00261         idIndx.sort();
00262     }


Member Function Documentation

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

Definition at line 291 of file ComputeQM.C.

References dist.

00291 {return dist < ref.dist;}

lssDistSort& lssDistSort::operator= ( const lssDistSort ref  )  [inline]

Definition at line 264 of file ComputeQM.C.

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

00264                                                    {
00265         type = ref.type;
00266         dist = ref.dist;
00267         idIndx.resize(idIndx.size());
00268         for (int i=0; i<ref.idIndx.size(); i++) idIndx.insert(ref.idIndx[i]) ;
00269         idIndx.sort();
00270         
00271         return *this;
00272     }

bool lssDistSort::operator== ( const lssDistSort ref  )  [inline]

Definition at line 274 of file ComputeQM.C.

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

00274                                             {
00275         bool returnVal = true;
00276         
00277         if (! (type == ref.type && dist == ref.dist))
00278             return false;
00279         
00280         if (idIndx.size() != ref.idIndx.size())
00281             return false;
00282         
00283         for (int i=0; i<ref.idIndx.size(); i++) {
00284             if (idIndx[i] != ref.idIndx[i])
00285                 return false;
00286         }
00287         
00288         return returnVal;
00289     }


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:
Generated on Mon Sep 25 01:17:18 2017 for NAMD by  doxygen 1.4.7