53 return NullObjectRef<UList<T>>();
60 return (i ==
size()-1 ? 0 : i+1);
67 return (i ? i-1 :
size()-1);
74 if (start<0 || (start && start>=size_))
77 <<
"start " << start <<
" out of range 0 ... " <<
max(size_-1, 0)
86 if (size<0 || size>size_)
89 <<
"size " << size <<
" out of range 0 ... " << size_
101 <<
"attempt to access element from zero sized list" 104 else if (i<0 || i>=size_)
107 <<
"index " << i <<
" out of range 0 ... " << size_-1
208 return *
reinterpret_cast<const List<T>*
>(
this);
324 for (
int i=0; i<n/2; i++)
326 Swap(ul[i], ul[n-1-i]);
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const_iterator cend() const
Return const_iterator to end traversing the constant UList.
reverse_iterator rend()
Return reverse_iterator to end reverse traversing the UList.
void checkSize(const label size) const
Check size is within valid range (0 ... size)
reverse_iterator rbegin()
Return reverse_iterator to begin reverse traversing the UList.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
T & operator[](const label)
Return element of UList.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
bool empty() const
Return true if the UList is empty (ie, size() is zero)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void checkStart(const label start) const
Check start is within valid range (0 ... size-1)
Traits class for primitives.
T * iterator
Random access iterator for traversing UList.
iterator end()
Return an iterator to end traversing the UList.
T & first()
Return the first element of the list.
void checkIndex(const label i) const
Check index i is within valid range (0 ... size-1)
label max_size() const
Return size of the largest possible UList.
label fcIndex(const label i) const
Return the forward circular index, i.e. the next index.
const T * cdata() const
Return a const pointer to the first data element,.
iterator begin()
Return an iterator to begin traversing the UList.
const_reverse_iterator crbegin() const
Return const_reverse_iterator to begin reverse traversing the UList.
static const label labelMax
errorManip< error > abort(error &err)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void reverse(UList< T > &, const label n)
static const UList< T > & null()
Return a null UList.
label rcIndex(const label i) const
Return the reverse circular index, i.e. the previous index.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
label size() const
Return the number of elements in the UList.
T * data()
Return a pointer to the first data element,.
void shallowCopy(const UList< T > &)
Copy the pointer held by the given UList.
const T * const_iterator
Random access iterator for traversing UList.
const_reverse_iterator crend() const
Return const_reverse_iterator to end reverse traversing the UList.
T & last()
Return the last element of the list.
const_iterator cbegin() const
Return const_iterator to begin traversing the constant UList.