19 m_proximity(proximity)
31 double delta1,delta2,delta3;
33 double retval_old = 100.0;
34 double retval_min = retval_old;
40 delta1=translate2.mag();
44 cout<<
" findMinimum: bad goodness step, > 10 un "<<endl;
55 translate+=translate2;
58 }
while ( (niterat<10) & ((delta1>0.00001)|(delta2>0.00001)) );
61 cout<<
" findMinimum: 10 iterations, not converging "<<endl;
64 cout<<
" findMinimum: bad goodness, not converging: "
65 <<
retval<<
" > "<<retval_min<<endl;
94 unsigned ipoint, ngood(0);
97 for(ipoint=0;ipoint<
npoints;ipoint++){
105 translate2 += cPoint-sPoint;
119 translate2 *= 1.0/ngood;
123 for(ipoint=0;ipoint<
npoints;ipoint++){
132 theLcm += thePoint.cross(theDelta);
133 Vect[0] = thePoint.x();
134 Vect[1] = thePoint.y();
135 Vect[2] = thePoint.z();
137 Tens += thePoint.mag2()*temp;
147 Vect[0] = theLcm.x();
148 Vect[1] = theLcm.y();
149 Vect[2] = theLcm.z();
150 Rota= Tens.inverse() * Vect;
152 translate2 -= aRotat2.cross(wPoint);
155 translate2.setZero();
170 for(ipoint=0;ipoint<
npoints;ipoint++){
175 distsum += (
cur - sur).
mag();
181 retval = std::numeric_limits<double>::infinity();