void init ( double [ ] [ ] proximity ) { size = proximity . length ; this . proximity = new float [ size * ( size + 1 ) / 2 ] ; // row wise /* for (int i = 0, k = 0; i < size; i++) { double[] pi = proximity[i]; for (int j = 0; j <= i; j++, k++) { this.proximity[k] = (float) pi[j]; } } */ // column wise for ( int j = 0 , k = 0 ; j < size ; j ++ ) { for ( int i = j ; i < size ; i ++ , k ++ ) { this . proximity [ k ] = ( float ) proximity [ i ] [ j ] ; } } }
Initialize the linkage with the lower triangular proximity matrix .