- [ ] Hoist the `if (.not. allocated(...)) ...` blocks into an initialization procedure and instead assert allocated status - [ ] Have caller provide a `cost` array that is of size `num_mini_batches` (make `cost` `intent(inout)`) - [ ] Allocate `pair_cost` array of size `maxval(size(mini_batches))`