public int compareRegions(int testRegionStartChromID, int testRegionStartBase, int testRegionEndChromID, int testRegionEndBase) { // test if this region is contained by (i.e. subset of) testRegion region if (containedIn(testRegionStartChromID, testRegionStartBase, testRegionEndChromID, testRegionEndBase)) return 0; // test if testRegion region is disjoint from above or below else if (disjointBelow(testRegionStartChromID, testRegionStartBase)) return -2; else if (disjointAbove(testRegionEndChromID, testRegionEndBase)) return 2; // Otherwise this region must intersect else if (this.intersectsBelow(testRegionStartChromID, testRegionStartBase)) return -1; else if (this.intersectsAbove(testRegionEndChromID, testRegionEndBase)) return 1; // unexpected condition is unknown return 3; }
public int compareRegions(RPChromosomeRegion testRegion) { // test if this region is contained by (i.e. subset of) testRegion region if (this.containedIn(testRegion)) return 0; // test if testRegion region is disjoint from above or below else if (this.disjointBelow(testRegion)) return -2; else if (this.disjointAbove(testRegion)) return 2; // Otherwise this region must intersect else if (this.intersectsBelow(testRegion)) return -1; else if (this.intersectsAbove(testRegion)) return 1; // unexpected condition is unknown return 3; }
public int compareRegions(RPChromosomeRegion testRegion) { // test if this region is contained by (i.e. subset of) testRegion region if (this.containedIn(testRegion)) return 0; // test if testRegion region is disjoint from above or below else if (this.disjointBelow(testRegion)) return -2; else if (this.disjointAbove(testRegion)) return 2; // Otherwise this region must intersect else if (this.intersectsBelow(testRegion)) return -1; else if (this.intersectsAbove(testRegion)) return 1; // unexpected condition is unknown return 3; }