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
116 return this->operator[](0);
123 return this->operator[](0);
130 return this->operator[](this->size()-1);
137 return this->operator[](this->size()-1);
208 return *
reinterpret_cast<const List<T>*
>(
this);
336 for (
int i=0; i<
n/2; i++)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
const_reverse_iterator crbegin() const
Return const_reverse_iterator to begin reverse traversing the UList.
T & first()
Return the first element of the list.
label max_size() const
Return size of the largest possible UList.
label rcIndex(const label i) const
Return the reverse circular index, i.e. the previous index.
const_reverse_iterator crend() const
Return const_reverse_iterator to end reverse traversing the UList.
static const UList< T > & null()
Return a null UList.
const T * const_iterator
Random access iterator for traversing UList.
const_iterator cbegin() const
Return const_iterator to begin traversing the constant UList.
void checkIndex(const label i) const
Check index i is within valid range (0 ... size-1)
T * iterator
Random access iterator for traversing UList.
std::reverse_iterator< const_iterator > const_reverse_iterator
Reverse iterator for reverse traversal of constant UList.
label size() const
Return the number of elements in the UList.
label fcIndex(const label i) const
Return the forward circular index, i.e. the next index.
bool empty() const
Return true if the UList is empty (ie, size() is zero)
reverse_iterator rbegin()
Return reverse_iterator to begin reverse traversing the UList.
T & operator[](const label)
Return element of UList.
iterator begin()
Return an iterator to begin traversing the UList.
const_iterator cend() const
Return const_iterator to end traversing the constant UList.
std::reverse_iterator< iterator > reverse_iterator
Reverse iterator for reverse traversal of UList.
const T * cdata() const
Return a const pointer to the first data element,.
void checkSize(const label size) const
Check size is within valid range (0 ... size)
reverse_iterator rend()
Return reverse_iterator to end reverse traversing the UList.
iterator end()
Return an iterator to end traversing 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.
T & last()
Return the last element of the list.
void checkStart(const label start) const
Check start is within valid range (0 ... size-1)
Traits class for primitives.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManip< error > abort(error &err)
void reverse(UList< T > &, const label n)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
static const label labelMax
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)