Package com.itextpdf.pdfocr.onnxtr.util
Class Batching
java.lang.Object
com.itextpdf.pdfocr.onnxtr.util.Batching
Static utility class to help with batching.
-
Method Summary
-
Method Details
-
wrap
Wraps an existing iterator into a new one, which output List-based batches,- Type Parameters:
-
E
- input iterator element type - Parameters:
-
iterator
- iterator to wrap -
batchSize
- target batch size. Last batch might have smaller size - Returns:
- batch iterator wrapper
-