/** Delegates to the underlying scorers, possibly wrapping the argument in a
* {@link CachingDocumentIterator}; then, if {@link #samples} is nonzero computes
* that many document scores and invokes {@link #setupEqualizationFactors()}.
*/
public void wrap( DocumentIterator documentIterator ) throws IOException {
if ( needsCaching ) documentIterator = new CachingDocumentIterator( documentIterator );
for( int i = n; i-- != 0; ) scorer[ i ].wrap( documentIterator );
if ( samples > 0 ) {
// Let us prepare a sample.
int i;
for( i = 0; i < samples && ( sampleDocument[ i ] = documentIterator.nextDocument() ) != -1; i++ ) {