int
OrientedCoordinateArray::compareTo(const OrientedCoordinateArray& oca) const
{
	int comp = compareOriented(*pts, orientationVar,
                               *oca.pts, oca.orientationVar);
#if 0 // MD - testing only
    int oldComp = SegmentStringDissolver.ptsComp.compare(pts, oca.pts);
    if ((oldComp == 0 || comp == 0) && oldComp != comp) {
      System.out.println("bidir mismatch");

      boolean orient1 = orientation(pts);
      boolean orient2 = orientation(oca.pts);
      int comp2 = compareOriented(pts, orientation,
                               oca.pts, oca.orientation);
      int oldComp2 = SegmentStringDissolver.ptsComp.compare(pts, oca.pts);
    }
#endif

	return comp;
}
Exemplo n.º 2
0
int ScaffoldComparer::Compare(const Scaffold &a, const Scaffold &b)
{
	Scaffold c(b);
	c.Reverse();
	return min(compareOriented(a, b), compareOriented(a, c));
}