public static int compareLexicographically ( IntTuple t0 , IntTuple t1 ) { Utils . checkForEqualSize ( t0 , t1 ) ; for ( int i = 0 ; i < t0 . getSize ( ) ; i ++ ) { if ( t0 . get ( i ) < t1 . get ( i ) ) { return - 1 ; } else if ( t0 . get ( i ) > t1 . get ( i ) ) { return 1 ; } } return 0 ; }
Compares two tuples lexicographically starting with the elements of the lowest index .