private int getConstraintIndex(int colIndex) {

        for (int i = 0; i < imColIndex.length; i++) {
            for (int j = 0; j < imColIndex[i].length; j++) {
                if (colIndex == imColIndex[i][j]) {
                    return i;
                }    // end of if (col == imColIndex[i][j])
            }        // end of for (int j=0; j<imColIndex[i].length; j++)
        }            // end of for (int i=0; i<imColIndex.length; i++)

        return -1;
    }
private int getConstraintIndex ( int colIndex ) { for ( int i = 0 ; i < imColIndex . length ; i ++ ) { for ( int j = 0 ; j < imColIndex [ i ] . length ; j ++ ) { if ( colIndex == imColIndex [ i ] [ j ] ) { return i ; } } } return - 1 ; }
answer -1, if the column is not part of any constraint