public Explanation idfExplain(CollectionStatistics collectionStats, TermStatistics termStats[]) {double idf = 0d; List<Explanation> subs = new ArrayList<>();for (final TermStatistics stat : termStats ) {Explanation idfExplain = idfExplain(collectionStats, stat);subs.add(idfExplain);idf += idfExplain.getValue().floatValue();}return Explanation.match((float) idf, "idf(), sum of:", subs);}

public Explanation idfExplain ( CollectionStatistics collectionStats , TermStatistics termStats [ ] ) { double idf = 0d ; List < Explanation > subs = new ArrayList < > ( ) ; for ( final TermStatistics stat : termStats ) { Explanation idfExplain = idfExplain ( collectionStats , stat ) ; subs . add ( idfExplain ) ; idf += idfExplain . getValue ( ) . floatValue ( ) ; } return Explanation . match ( ( float ) idf , "idf(), sum of:" , subs ) ; }
public virtual Explanation IdfExplain(CollectionStatistics collectionStats, TermStatistics termStats){long df = termStats.DocFreq;long max = collectionStats.MaxDoc;float idf = Idf(df, max);return new Explanation(idf, "idf(docFreq=" + df + ", maxDocs=" + max + ")");}
