private double costPendingPhrases(){
  double score=0.0;
  for (  PendingPhrase<TK,FV> pendingPhrase : pendingPhrases) {
    ConcreteRule<TK,FV> opt=pendingPhrase.concreteOpt;
    assert (opt.abstractRule instanceof DTURule);
    DTURule<TK> dtuOpt=(DTURule<TK>)opt.abstractRule;
    for (int i=pendingPhrase.segmentIdx + 1; i < dtuOpt.dtus.length; ++i) {
      score+=pendingPhrase.futureCosts[i];
    }
  }
  return score;
}

private double costPendingPhrases ( ) { double score = 0.0 ; for ( PendingPhrase < TK , FV > pendingPhrase : pendingPhrases ) { ConcreteRule < TK , FV > opt = pendingPhrase . concreteOpt ; assert ( opt . abstractRule instanceof DTURule ) ; DTURule < TK > dtuOpt = ( DTURule < TK > ) opt . abstractRule ; for ( int i = pendingPhrase . segmentIdx + 1 ; i < dtuOpt . dtus . length ; ++ i ) { score += pendingPhrase . futureCosts [ i ] ; } } return score ; }
compute cost of pending phrases .
