private void calculateAndSetSignedMutualInformation(int i,int j,double[][] jointProbabilities){
  jointProbabilities[1][1]=(double)Math.round(mCoOccurrencesAndMiMatrix.get(i,j)) / m_totalNumIntervals;
  jointProbabilities[1][0]=(double)Math.round(mCoOccurrencesAndMiMatrix.get(i,i) - mCoOccurrencesAndMiMatrix.get(i,j)) / m_totalNumIntervals;
  jointProbabilities[0][1]=(double)Math.round(mCoOccurrencesAndMiMatrix.get(j,j) - mCoOccurrencesAndMiMatrix.get(i,j)) / m_totalNumIntervals;
  jointProbabilities[0][0]=(double)Math.round(m_totalNumIntervals - mCoOccurrencesAndMiMatrix.get(i,i) - mCoOccurrencesAndMiMatrix.get(j,j) + mCoOccurrencesAndMiMatrix.get(i,j)) / m_totalNumIntervals;
  final double mi=calculateSign(jointProbabilities) * calculateMutualInformation(jointProbabilities);
  mCoOccurrencesAndMiMatrix.set(i,j,mi);
}

private void calculateAndSetSignedMutualInformation ( int i , int j , double [ ] [ ] jointProbabilities ) { jointProbabilities [ 1 ] [ 1 ] = ( double ) Math . round ( mCoOccurrencesAndMiMatrix . get ( i , j ) ) / m_totalNumIntervals ; jointProbabilities [ 1 ] [ 0 ] = ( double ) Math . round ( mCoOccurrencesAndMiMatrix . get ( i , i ) - mCoOccurrencesAndMiMatrix . get ( i , j ) ) / m_totalNumIntervals ; jointProbabilities [ 0 ] [ 1 ] = ( double ) Math . round ( mCoOccurrencesAndMiMatrix . get ( j , j ) - mCoOccurrencesAndMiMatrix . get ( i , j ) ) / m_totalNumIntervals ; jointProbabilities [ 0 ] [ 0 ] = ( double ) Math . round ( m_totalNumIntervals - mCoOccurrencesAndMiMatrix . get ( i , i ) - mCoOccurrencesAndMiMatrix . get ( j , j ) + mCoOccurrencesAndMiMatrix . get ( i , j ) ) / m_totalNumIntervals ; final double mi = calculateSign ( jointProbabilities ) * calculateMutualInformation ( jointProbabilities ) ; mCoOccurrencesAndMiMatrix . set ( i , j , mi ) ; }
calculates the signed mutual information for the pair i , j and sets it in the corresponding place of the m_mimatrix .
