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