Skip to content

Instantly share code, notes, and snippets.

@tckb
Last active January 4, 2016 20:58
Show Gist options
  • Save tckb/8677280 to your computer and use it in GitHub Desktop.
Save tckb/8677280 to your computer and use it in GitHub Desktop.
public static int getRadius(int[][] distMatrix){
int radius = Integer.MAX_VALUE;
//biggest value in evry column of the matrix = ece
// radius = minium eccentricity of a molecule
for(int r=0;r<distMatrix.length;r++){
int maxDist=0;
for(int c=0;r<distMatrix.length;r++){
if(distMatrix[r][c] > maxDist ){
maxDist = distMatrix[r][c];
}
}
if( maxDist < radius ){
radius = maxDist;
}
}
return radius;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment