39 if (a.size_ != this->size_)
42 <<
"ULists have different sizes: " 43 << this->size_ <<
" " << a.size_
52 memcpy(this->v_, a.v_, this->byteSize());
97 <<
"Cannot return the binary size of a list of " 98 "non-primitive elements" 102 return this->size_*
sizeof(
T);
113 template<
class T,
class Cmp>
123 std::stable_sort(a.
begin(), a.
end());
127 template<
class T,
class Cmp>
130 std::stable_sort(a.
begin(), a.
end(), cmp);
137 std::random_shuffle(a.
begin(), a.
end());
146 if (this->size_ != a.size_)
177 vi < end() && ai < a.
end();
191 if (this->size_ < a.size_)
iterator end()
Return an iterator to end traversing the UList.
std::streamsize byteSize() const
Return the binary size in number of characters of the UList.
bool operator==(const UList< T > &) const
Equality operation on ULists of the same type.
tmp< fvMatrix< Type > > operator==(const fvMatrix< Type > &, const fvMatrix< Type > &)
void assign(const UList< T > &)
Assign elements to those from UList.
#define List_FOR_ALL(f, i)
bool operator!=(const UList< T > &) const
The opposite of the equality operation. Takes linear time.
void shuffle(UList< T > &)
friend Ostream & operator(Ostream &, const UList< T > &)
bool operator<(const dimensioned< Type > &, const dimensioned< Type > &)
iterator begin()
Return an iterator to begin traversing the UList.
bool operator<(const UList< T > &) const
Compare two ULists lexicographically. Takes linear time.
bool operator>(const dimensioned< Type > &, const dimensioned< Type > &)
void swap(UList< T > &)
Swap two ULists of the same type in constant time.
errorManip< error > abort(error &err)
Template function to specify if the data of a type are contiguous.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
void operator=(const T &)
Assignment of all entries to the given value.
bool operator<=(const UList< T > &) const
Return true if !(a > b). Takes linear time.
bool operator>(const UList< T > &) const
Compare two ULists lexicographically. Takes linear time.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void stableSort(UList< T > &)
#define List_ELEM(f, fp, i)
bool operator>=(const UList< T > &) const
Return true if !(a < b). Takes linear time.
List<T> is a 1D vector of objects of type T, where the size of the vector is known and used for subsc...
const T * const_iterator
Random access iterator for traversing UList.
#define List_ACCESS(type, f, fp)
bool equal(const T &s1, const T &s2)
#define List_CONST_ACCESS(type, f, fp)