37 if (a.size_ != this->size_)
40 <<
"ULists have different sizes: "
41 << this->size_ <<
" " << a.size_
50 memcpy(this->v_, a.v_, this->byteSize());
102 if (!contiguous<T>())
105 <<
"Cannot return the binary size of a list of "
106 "non-primitive elements"
110 return this->size_*
sizeof(
T);
121 template<
class T,
class Cmp>
131 std::stable_sort(a.
begin(), a.
end());
135 template<
class T,
class Cmp>
138 std::stable_sort(a.
begin(), a.
end(), cmp);
147 if (this->size_ != a.size_)
178 vi < end() && ai < a.
end();
192 if (this->size_ < a.size_)
List<T> is a 1D vector of objects of type T, where the size of the vector is known and used for subsc...
#define List_ACCESS(type, f, fp)
#define List_ELEM(f, fp, i)
#define List_FOR_ALL(f, i)
#define List_CONST_ACCESS(type, f, fp)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void deepCopy(const UList< T > &)
Copy elements of the given UList.
bool operator<(const UList< T > &) const
Compare two ULists lexicographically. Takes linear time.
const T * const_iterator
Random access iterator for traversing UList.
bool operator>=(const UList< T > &) const
Return true if !(a < b). Takes linear time.
iterator begin()
Return an iterator to begin traversing the UList.
bool operator>(const UList< T > &) const
Compare two ULists lexicographically. Takes linear time.
std::streamsize byteSize() const
Return the binary size in number of characters of the UList.
void swap(UList< T > &)
Swap two ULists of the same type in constant time.
bool operator==(const UList< T > &) const
Equality operation on ULists of the same type.
iterator end()
Return an iterator to end traversing the UList.
bool operator!=(const UList< T > &) const
The opposite of the equality operation. Takes linear time.
friend Ostream & operator(Ostream &, const UList< T > &)
bool operator<=(const UList< T > &) const
Return true if !(a > b). Takes linear time.
A class representing the concept of 0 used to avoid unnecessary manipulations for objects that are kn...
Template function to specify if the data of a type are contiguous.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
bool equal(const T &s1, const T &s2)
tmp< fvMatrix< Type > > operator==(const fvMatrix< Type > &, const fvMatrix< Type > &)
bool operator<(const instant &, const instant &)
errorManip< error > abort(error &err)
bool operator>(const instant &, const instant &)
void stableSort(UList< T > &)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)