25 std::pair<float,float>
28 if(edgeX>9E5&&edgeY>9E5&&xErr>9E5&&yErr>9E5)
29 return std::make_pair(999999, 999999);
31 float distance = 999999;
34 if(edgeX<0 && edgeY<0) {
35 if(edgeX<edgeY) { distance =
edgeY; error =
yErr; }
38 if(edgeX<0 && edgeY>0) { distance =
edgeY; error =
yErr; }
39 if(edgeX>0 && edgeY<0) { distance =
edgeX; error =
xErr; }
40 if(edgeX>0 && edgeY>0) { distance =
sqrt(edgeX*edgeX+edgeY*edgeY); error = distance ?
sqrt(edgeX*edgeX*xErr*xErr+edgeY*edgeY*yErr*yErr)/fabs(distance) : 0; }
42 return std::make_pair(distance, error);
int station() const
Return the station number.
std::pair< float, float > getDistancePair(float edgeX, float edgeY, float xErr, float yErr) const