private double calculateMaxMembershipChange(final double[][] matrix){
  double maxMembership=0.0;
  for (int i=0; i < points.size(); i++) {
    for (int j=0; j < clusters.size(); j++) {
      double v=FastMath.abs(membershipMatrix[i][j] - matrix[i][j]);
      maxMembership=FastMath.max(v,maxMembership);
    }
  }
  return maxMembership;
}

private double calculateMaxMembershipChange ( final double [ ] [ ] matrix ) { double maxMembership = 0.0 ; for ( int i = 0 ; i < points . size ( ) ; i ++ ) { for ( int j = 0 ; j < clusters . size ( ) ; j ++ ) { double v = FastMath . abs ( membershipMatrix [ i ] [ j ] - matrix [ i ] [ j ] ) ; maxMembership = FastMath . max ( v , maxMembership ) ; } } return maxMembership ; }
calculate the maximum element - by - element change of the membership matrix for the current iteration .
