#include <structures.h>
Public Member Functions | |
| TupleSignature () | |
| TupleSignature (int n, TupleSigType t, Index paramType, char ir=1) | |
| TupleSignature (const TupleSignature &oneSig) | |
| TupleSignature & | operator= (const TupleSignature &oneSig) |
| int | operator== (const TupleSignature &sig) const |
| ~TupleSignature () | |
| void | setOffsets (int *offs) |
| void | setEmpty () |
| int | isEmpty () |
| void | output (FILE *ofp) |
| int | hash () const |
| void | pack (MOStream *msg) |
| void | unpack (MIStream *msg) |
Public Attributes | |
| TupleSigType | tupleType |
| int | numOffset |
| int * | offset |
| Index | tupleParamType |
| char | isReal |
|
|
Definition at line 191 of file structures.h.
|
|
||||||||||||||||||||
|
Definition at line 196 of file structures.h. 00196 {
00197 tupleType = t;
00198 numOffset = n;
00199 offset = new int[n];
00200 tupleParamType = paramType;
00201 isReal = ir;
00202 }
|
|
|
Definition at line 203 of file structures.h. References isReal, numOffset, offset, tupleParamType, and tupleType. 00203 {
00204 tupleType = oneSig.tupleType;
00205 numOffset = oneSig.numOffset;
00206 offset = new int[numOffset];
00207 setOffsets(oneSig.offset);
00208 tupleParamType = oneSig.tupleParamType;
00209 isReal = oneSig.isReal;
00210 }
|
|
|
Definition at line 240 of file structures.h. 00240 {
00241 if(offset) delete[] offset;
00242 }
|
|
|
Definition at line 286 of file structures.h. References circShift(). 00286 {
00287 unsigned int code = tupleType;
00288 unsigned int codesz = 8 * sizeof(int);
00289 unsigned int shift = codesz / numOffset;
00290
00291 if (shift == 0) shift=1;
00292 unsigned int i;
00293 for(i=0; i < numOffset; i++) {
00294 code = circShift(code,shift);
00295 code ^= offset[i];
00296 }
00297 return code;
00298 }
|
|
|
Definition at line 277 of file structures.h. 00277 {
00278 return offset==NULL;
00279 }
|
|
|
Definition at line 211 of file structures.h. References isReal, numOffset, offset, tupleParamType, and tupleType. 00211 {
00212 tupleType = oneSig.tupleType;
00213 numOffset = oneSig.numOffset;
00214 if(offset) delete [] offset;
00215 offset = new int[numOffset];
00216 setOffsets(oneSig.offset);
00217 tupleParamType = oneSig.tupleParamType;
00218 isReal = oneSig.isReal;
00219 return *this;
00220 }
|
|
|
Definition at line 221 of file structures.h. References isReal, numOffset, offset, tupleParamType, and tupleType. 00221 {
00222 if(tupleType!=sig.tupleType)
00223 return 0;
00224
00225 if(tupleParamType != sig.tupleParamType)
00226 return 0;
00227
00228 if(isReal != sig.isReal)
00229 return 0;
00230
00231 if(numOffset != sig.numOffset) return 0;
00232
00233 int equalCnt=0;
00234
00235 for(int i=0; i<numOffset; i++){
00236 equalCnt += (offset[i]==sig.offset[i]);
00237 }
00238 return equalCnt==numOffset;
00239 }
|
|
|
Definition at line 280 of file structures.h. Referenced by outputCompressedFile(). 00280 {
00281 for(int i=0; i<numOffset; i++)
00282 fprintf(ofp, "%d ", offset[i]);
00283 fprintf(ofp, "| %d | %d\n", tupleParamType, isReal);
00284 }
|
|
|
|
|
|
Definition at line 273 of file structures.h. 00273 {
00274 delete [] offset;
00275 offset = NULL;
00276 }
|
|
|
Definition at line 243 of file structures.h. 00243 {
00244 for(int i=0; i<numOffset; i++)
00245 offset[i] = offs[i];
00246 //sort the offset in increasing order
00247 //based on the input files, this offset is almost sorted increasingly
00248 //Therefore using insertion sort
00249 /*switch(numOffset){
00250 case 1:
00251 break;
00252 case 2:
00253 if(offset[0]>offset[1]){
00254 int tmp = offset[0];
00255 offset[0] = offset[1];
00256 offset[1] = tmp;
00257 }
00258 break;
00259 default: //insertion sort
00260 for(int ii=1; ii<numOffset; ii++){
00261 int val = offset[ii];
00262 for(int jj=ii-1; jj>=0; jj--){
00263 if(offset[jj]<val){
00264 offset[jj+1] = offset[jj];
00265 offset[jj] = val;
00266 }else
00267 break;
00268 }
00269 }
00270 }*/
00271
00272 }
|
|
|
|
|
|
Definition at line 188 of file structures.h. Referenced by buildExclusions(), operator=(), operator==(), and TupleSignature(). |
|
|
Definition at line 177 of file structures.h. Referenced by operator=(), operator==(), and TupleSignature(). |
|
|
|
Definition at line 183 of file structures.h. Referenced by AngleElem::AngleElem(), BondElem::BondElem(), CrosstermElem::CrosstermElem(), DihedralElem::DihedralElem(), dumpbench(), ExclElem::ExclElem(), ImproperElem::ImproperElem(), operator=(), operator==(), and TupleSignature(). |
|
|
Definition at line 176 of file structures.h. Referenced by operator=(), operator==(), and TupleSignature(). |
1.3.9.1