source/sample/transformer/DataSet.cpp
void DataSetBase::SortByTgtLengthAscending()
{
	stable_sort(buf->items, buf->items + buf->count,
		[](void* a, void* b) {
			return ((Sample*)(a))->tgtSeq->Size() <
				   ((Sample*)(b))->tgtSeq->Size();
		});
}
/* sort the buffer by target sentence length (in ascending order) */
sort the buffer by target sentence length (in ascending order)
sort the buffer by target sentence length ( in ascending order )
void DataSetBase::SortByTgtLengthAscending()
{
	stable_sort(buf->items, buf->items + buf->count,
		[](void* a, void* b) {
			return ((Sample*)(a))->tgtSeq->Size() <
				   ((Sample*)(b))->tgtSeq->Size();
		});
}
void DataSetBase :: SortByTgtLengthAscending ( ) { stable_sort ( buf -> items , buf -> items + buf -> count , [ ] ( void * a , void * b ) { return ( ( Sample * ) ( a ) ) -> tgtSeq -> Size ( ) < ( ( Sample * ) ( b ) ) -> tgtSeq -> Size ( ) ; } ) ; }
sort the buffer by target sentence length (in ascending order)
sort the buffer by target sentence length ( in ascending order )