Go to the documentation of this file.
46 this->checkStart(
range.start());
87 Foam::Swap(this->
operator[](0), this->
operator[](i));
97 const label
upper = size()-1;
101 Foam::Swap(this->
operator[](i), this->
operator[](upper));
109 const label len = this->size_;
111 if (len != list.size_)
114 <<
"Lists have different sizes: "
115 << len <<
" != " << list.size() <<
nl
121 if (is_contiguous<T>::value)
125 static_cast<void*
>(this->v_), list.v_, this->size_bytes()
133 for (label i = 0; i < len; ++i)
146 const label len = this->size_;
148 if (len != list.size())
151 <<
"Lists have different sizes: "
152 << len <<
" != " << list.size() <<
nl
158 for (label i = 0; i < len; ++i)
171 const label len = this->size();
175 for (label i=0; i < len; ++i)
185 const label len = this->size();
189 for (label i=0; i < len; ++i)
201 if (!is_contiguous<T>::value)
204 <<
"Invalid for non-contiguous data types"
207 return this->size_bytes();
214 const label len = this->size();
222 if (list[
pos] == val)
239 if (pos < 0 || pos >= this->size())
241 pos = this->size()-1;
248 if (list[
pos] == val)
267 template<
class T,
class Compare>
277 std::stable_sort(a.
begin(), a.
end());
281 template<
class T,
class Compare>
284 std::stable_sort(a.
begin(), a.
end(), comp);
300 const label len = this->size_;
301 if (len != list.size_)
311 for (label i = 0; i < len; ++i)
313 equal = (lhs[i] == rhs[i]);
333 const_iterator lhs =
begin(), rhs = list.
begin();
334 lhs <
end() && rhs < list.
end();
342 else if (*rhs < *lhs)
349 return (this->size_ < list.size_);
356 return list.operator<(*this);
363 return !list.operator<(*this);
bool operator<(const UList< T > &list) const
void Swap(DynamicList< T, SizeMinA > &a, DynamicList< T, SizeMinB > &b)
constexpr auto begin(C &c) -> decltype(c.begin())
labelRange validateRange(const labelRange &requestedRange) const
bool operator>=(const UList< T > &a) const
static constexpr const zero Zero
bool operator==(const UList< T > &a) const
bool operator<=(const UList< T > &a) const
void deepCopy(const UList< T > &list)
void swapFirst(const label i)
void stableSort(UList< T > &a)
label rfind(const T &val, label pos=-1) const
string lower(const std::string &s)
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
void swapLast(const label i)
void moveFirst(const label i)
bool operator!=(const UList< T > &a) const
A range or interval of labels defined by a start and a size.
constexpr auto end(C &c) -> decltype(c.end())
label size() const noexcept
errorManip< error > abort(error &err)
bool operator>(const UList< T > &a) const
#define FatalErrorInFunction
#define List_CONST_ACCESS(type, f, fp)
void shuffle(UList< T > &a)
UList< T > & operator=(const UList< T > &)=delete
labelRange subset0(const label size) const
std::streamsize byteSize() const
iterator begin() noexcept
bool operator<(const IOstreamOption::versionNumber &a, const IOstreamOption::versionNumber &b) noexcept
Base for lists with indirect addressing, templated on the list contents type and the addressing type....
string upper(const std::string &s)
void moveLast(const label i)
#define List_ACCESS(type, f, fp)
label find(const T &val, label pos=0) const
A template class to specify that a data type can be considered as being contiguous in memory.
Macros for accessing List elements.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
dimensionedScalar pos(const dimensionedScalar &ds)