private float weight ( int c1 , int c2 ) { float w ; float pc1 = wordProb . get ( c1 ) ; float pc2 = wordProb . get ( c2 ) ; if ( c1 == c2 ) { float pcc = getProb ( c1 , c1 ) ; w = clacW ( pcc , pc1 , pc2 ) ; } else { float pcc1 = getProb ( c1 , c2 ) ; float p1 = clacW ( pcc1 , pc1 , pc2 ) ; float pcc2 = getProb ( c2 , c1 ) ; float p2 = clacW ( pcc2 , pc2 , pc1 ) ; w = p1 + p2 ; } setweight ( c1 , c2 , w ) ; return w ; }
total graph weight