bool Foam::UList<T>::operator<(const UList<T>& a) const { for ( const_iterator vi = begin(), ai = a.begin(); vi < end() && ai < a.end(); vi++, ai++ ) { if (*vi < *ai) { return true; } else if (*vi > *ai) { return false; } } if (this->size_ < a.size_) { return true; } else { return false; } }
void Foam::stableSort(UList<T>& a, const Cmp& cmp) { std::stable_sort(a.begin(), a.end(), cmp); }
void Foam::shuffle(UList<T>& a) { std::random_shuffle(a.begin(), a.end()); }
void Foam::stableSort(UList<T>& a) { std::stable_sort(a.begin(), a.end()); }