Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.55 KB | None | 0 0
  1. public boolean isMonge() throws NullPointerException {
  2.     int i,j,k,l;
  3.  
  4.     for(i=0;i<dim-1;i++){
  5.         for(j=0;j<dim-1;j++){
  6.             for(k=i+1;k<dim;k++){
  7.                 for(l=j+1;l<dim;l++){
  8.                     if(Math.min(getValueOf(lowerMatrix, i, j), getValueOf(lowerMatrix, k, l))
  9.                     > Math.min(getValueOf(lowerMatrix, i, l), getValueOf(lowerMatrix, k, j))
  10.                     || Math.min(getValueOf(upperMatrix, i, j), getValueOf(upperMatrix, k, l))
  11.                     > Math.min(getValueOf(upperMatrix, i, l), getValueOf(upperMatrix, k, j))){
  12.                         return false;
  13.                     }
  14.                 }
  15.             }
  16.         }
  17.     }
  18.     return true;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement