question: protected static double computeH ( DoubleArray dist_i , double [ ] pij_row , double mbeta ) { final int len = dist_i . size ( ) ; assert ( pij_row . length == len ) ; double sumP = 0. ; for ( int j = 0 ; j < len ; j ++ ) { sumP += ( pij_row [ j ] = Math . exp ( dist_i . get ( j ) * mbeta ) ) ; } if ( ! ( sumP > 0 ) ) { return Double . NEGATIVE_INFINITY ; } final double s = 1. / sumP ; double sum = 0. ; for ( int j = 0 ; j < len ; j ++ ) { sum += dist_i . get ( j ) * ( pij_row [ j ] *= s ) ; } return Math . log ( sumP ) - mbeta * sum ; }
target:  Compute H (observed perplexity) for row i, and the row pij_i.