public float calcL ( int c1 , int c2 ) { float L = 0 ; TIntIterator it = slots . iterator ( ) ; while ( it . hasNext ( ) ) { int k = it . next ( ) ; if ( k == c2 ) continue ; L += weight ( c1 , c2 , k ) ; } it = slots . iterator ( ) ; while ( it . hasNext ( ) ) { int k = it . next ( ) ; L -= getweight ( c1 , k ) ; L -= getweight ( c2 , k ) ; } return L ; }
calculate the value L