226 std::vector< KeyValuePair<unsigned int, std::pair<std::size_t, std::size_t> > > order;
229 auto batch = dataset.
batch(b);
230 for (std::size_t i=0; i<
batchSize(batch); i++)
232 order.emplace_back(
getBatchElement(batch, i).label, std::make_pair(b, i));
237 std::sort(order.begin(), order.end());
240 for (
auto const& p : order)
244 if (oneMinusOne) stream << 2*int(element.label)-1 <<
" ";
246 else stream << element.label+1 <<
" ";
248 for (
auto it = element.input.begin(); it != element.input.end(); ++it)
250 stream <<
" " << it.index()+1 <<
":" << *it;