Go to the documentation of this file.
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_)
176 const_iterator vi = begin(), ai = a.
begin();
177 vi < end() && ai < a.
end();
191 if (this->size_ < a.
size_)
void swap(UList< T > &)
Swap two ULists of the same type in constant time.
bool operator<=(const UList< T > &) const
Return true if !(a > b). Takes linear time.
#define List_FOR_ALL(f, i)
bool operator>=(const UList< T > &) const
Return true if !(a < b). Takes linear time.
T *__restrict__ v_
Vector of values of type T.
tmp< fvMatrix< Type > > operator==(const fvMatrix< Type > &, const fvMatrix< Type > &)
void shuffle(UList< T > &)
iterator begin()
Return an iterator to begin traversing the UList.
void stableSort(UList< T > &)
bool operator!=(const UList< T > &) const
The opposite of the equality operation. Takes linear time.
void assign(const UList< T > &)
Assign elements to those from UList.
#define List_ELEM(f, fp, i)
bool operator==(const UList< T > &) const
Equality operation on ULists of the same type.
Raster operator>(const Raster &rast, const double value)
bool operator<(const UList< T > &) const
Compare two ULists lexicographically. Takes linear time.
errorManip< error > abort(error &err)
bool operator>(const UList< T > &) const
Compare two ULists lexicographically. Takes linear time.
label size_
Number of elements in UList.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define List_CONST_ACCESS(type, f, fp)
Raster operator<(const Raster &rast, const double value)
Template function to specify if the data of a type are contiguous.
std::streamsize byteSize() const
Return the binary size in number of characters of the UList.
iterator end()
Return an iterator to end traversing the UList.
#define List_ACCESS(type, f, fp)
bool equal(const T &s1, const T &s2)
friend Ostream & operator(Ostream &, const UList< T > &)
void operator=(const T &)
Assignment of all entries to the given value.
List<T> is a 1D vector of objects of type T, where the size of the vector is known and used for subsc...