protected double currentScoreFunction(){
  double score=0.;
  for (int i=0; i < this.values[this.currentVar1].length; i++) {
    for (int j=0; j < this.values[this.currentVar2].length; j++) {
      score-=this.currentCounts[this.currentVar1][this.currentVar2][i][j] * Math.log(this.currentPi[i][j]);
    }
  }
  return score;
}

protected double currentScoreFunction ( ) { double score = 0. ; for ( int i = 0 ; i < this . values [ this . currentVar1 ] . length ; i ++ ) { for ( int j = 0 ; j < this . values [ this . currentVar2 ] . length ; j ++ ) { score -= this . currentCounts [ this . currentVar1 ] [ this . currentVar2 ] [ i ] [ j ] * Math . log ( this . currentPi [ i ] [ j ] ) ; } } return score ; }
function to be minimized : - loglikelihood . it * is * assumed that computefibuffer and computecurrentpi were called before this method .
