ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-2.0/src/selection/SelectionEvaluator.cpp
(Generate patch)

Comparing trunk/OOPSE-2.0/src/selection/SelectionEvaluator.cpp (file contents):
Revision 2035 by tim, Tue Feb 15 19:36:07 2005 UTC vs.
Revision 2102 by tim, Thu Mar 10 16:14:07 2005 UTC

# Line 49 | Line 49 | SelectionEvaluator::SelectionEvaluator(SimInfo* si) :
49   namespace oopse {
50  
51  
52 < SelectionEvaluator::SelectionEvaluator(SimInfo* si) : info(si), nameFinder(info), distanceFinder(info), isLoaded_(false){
52 > SelectionEvaluator::SelectionEvaluator(SimInfo* si)
53 >    : info(si), nameFinder(info), distanceFinder(info), indexFinder(info), isLoaded_(false){
54 >    
55      nStuntDouble = info->getNGlobalAtoms() + info->getNRigidBodies();
56   }            
57  
# Line 84 | Line 86 | void SelectionEvaluator::clearState() {
86   }
87  
88   void SelectionEvaluator::clearState() {
87    //for (int i = scriptLevelMax; --i >= 0; )
88    //    stack[i].clear();
89    //scriptLevel = 0;
89      error = false;
90      errorMessage = "";
91   }
# Line 228 | Line 227 | BitSet SelectionEvaluator::comparatorInstruction(const
227              compareProperty(atom, bs, property, comparator, comparisonValue);
228          }
229          
231        //change the positions of atoms which belong to the rigidbodies
230          for (rb = mol->beginRigidBody(rbIter); rb != NULL; rb = mol->nextRigidBody(rbIter)) {
231              compareProperty(rb, bs, property, comparator, comparisonValue);
232          }        
# Line 401 | Line 399 | BitSet SelectionEvaluator::indexInstruction(const boos
399          if (index < 0 || index >= bs.size()) {
400              invalidIndex(index);
401          } else {
402 <            bs.setBitOn(index);
402 >            bs = indexFinder.find(index);
403          }
404      } else if (value.type() == typeid(std::pair<int, int>)) {
405          std::pair<int, int> indexRange= boost::any_cast<std::pair<int, int> >(value);
# Line 409 | Line 407 | BitSet SelectionEvaluator::indexInstruction(const boos
407          if (indexRange.first < 0 || indexRange.second >= bs.size()) {
408              invalidIndexRange(indexRange);
409          }else {
410 <            bs.setRangeOn(indexRange.first, indexRange.second);
410 >            bs = indexFinder.find(indexRange.first, indexRange.second);
411          }
412      }
413  
414      return bs;
415   }
416  
419 //BitSet SelectionEvaluator::evaluate(int frameNo) {
420 //
421 //}
422
417   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines