ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-2.0/src/types/MoleculeStamp.cpp
(Generate patch)

Comparing branches/new_design/OOPSE-2.0/src/types/MoleculeStamp.cpp (file contents):
Revision 1831 by tim, Thu Dec 2 05:04:20 2004 UTC vs.
Revision 1832 by tim, Thu Dec 2 16:04:19 2004 UTC

# Line 520 | Line 520 | bool MoleculeStamp::isAtomInRigidBody(int atomIndex, i
520   //return the position of joint atom apears in  rigidbody's definition
521   //for the time being, we will use the most inefficient algorithm, the complexity is O(N2)
522   //actually we could improve the complexity to O(NlgN) by sorting the atom index in rigid body first
523 < std::vector<pair<int, int> > MoleculeStamp::getJointAtoms(int rb1, int rb2){
523 > std::vector<std::pair<int, int> > MoleculeStamp::getJointAtoms(int rb1, int rb2){
524    RigidBodyStamp* rbStamp1;
525    RigidBodyStamp* rbStamp2;
526    int natomInRb1;
527    int natomInRb2;
528    int atomIndex1;
529    int atomIndex2;
530 <   std::vector<pair<int, int> > jointAtomIndexPair;
530 >   std::vector<std::pair<int, int> > jointAtomIndexPair;
531    
532    rbStamp1 = this->getRigidBody(rb1);
533    natomInRb1 =rbStamp1->getNMembers();
# Line 542 | Line 542 | bool MoleculeStamp::isAtomInRigidBody(int atomIndex, i
542        atomIndex2 = rbStamp2->getMember(j);
543  
544        if(atomIndex1 == atomIndex2){
545 <        jointAtomIndexPair.push_back(make_pair(i, j));
545 >        jointAtomIndexPair.push_back(std::make_pair(i, j));
546          break;
547        }
548        

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines