private boolean hasCandidate ( int n ) { for ( int j = ( n * matrix . mCols ) , end = ( j + matrix . mCols ) ; j < end ; j ++ ) if ( matrix . get ( j ) ) return true ; return false ; }
Check if there are any feasible mappings left for the query vertex n . We scan the compatibility matrix to see if any value is > 0 .