35 completeList_(
const_cast<UList<T>&
>(completeList)),
45 return addressing_.size();
52 return addressing_.empty();
59 return completeList_[addressing_.first()];
66 return completeList_[addressing_.first()];
73 return completeList_[addressing_.last()];
80 return completeList_[addressing_.last()];
107 result[i] = operator[](i);
117 return completeList_[addressing_[i]];
124 return completeList_[addressing_[i]];
131 if (addressing_.size() != ae.
size())
133 FatalErrorIn(
"UIndirectList<T>::operator=(const UList<T>&)")
134 <<
"Addressing and list of addressed elements " 135 "have different sizes: " 136 << addressing_.size() <<
" " << ae.
size()
142 completeList_[addressing_[i]] = ae[i];
150 if (addressing_.size() != ae.
size())
152 FatalErrorIn(
"UIndirectList<T>::operator=(const UIndirectList<T>&)")
153 <<
"Addressing and list of addressed elements " 154 "have different sizes: " 155 << addressing_.size() <<
" " << ae.
size()
161 completeList_[addressing_[i]] = ae[i];
171 completeList_[addressing_[i]] = t;
T & last()
Return the last element of the list.
bool empty() const
Return true if the list is empty (ie, size() is zero).
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
T & operator[](const label)
Return non-const access to an element.
const UList< T > & completeList() const
Return the complete list.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
const List< label > & addressing() const
Return the list addressing.
A List with indirect addressing.
label size() const
Return the number of elements in the list.
label size() const
Return the number of elements in the UList.
errorManip< error > abort(error &err)
T & first()
Return the first element of the list.
List< T > operator()() const
Return the addressed elements as a List.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
void operator=(const UList< T > &)
Assignment from UList of addressed elements.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
UIndirectList(const UList< T > &, const labelUList &)
Construct given the complete list and the addressing array.