Go to the documentation of this file.
36 posList_(
const_cast<UList<T>&
>(posList)),
37 negList_(
const_cast<UList<T>&
>(negList)),
50 posList_(
const_cast<UList<T>&
>(posList)),
51 negList_(
const_cast<UList<T>&
>(negList)),
61 return addressing_.size();
68 return addressing_.empty();
110 addressing_.transfer(addr());
137 result[i] = operator[](i);
147 label index = addressing_[i];
151 return posList_[index];
155 return negList_[-index-1];
163 label index = addressing_[i];
167 return posList_[index];
171 return negList_[-index-1];
179 if (addressing_.size() != ae.
size())
182 <<
"Addressing and list of addressed elements "
183 "have different sizes: "
184 << addressing_.size() <<
" " << ae.
size()
190 operator[](i) = ae[i];
label size() const
Return the number of elements in the list.
bool empty() const
Return true if the list is empty (ie, size() is zero).
#define forAll(list, i)
Loop across all elements in list.
void resetAddressing(const labelUList &)
Reset addressing.
A simple container for copying or transferring objects of type <T>.
void operator=(const UList< T > &)
Assignment from UList of addressed elements.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
List< T > operator()() const
Return the addressed elements as a List.
const UList< T > & posList() const
T & operator[](const label)
Return non-const access to an element.
errorManip< error > abort(error &err)
static label posIndex(const label)
Calculate index given whether index is into posList or negList.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const List< label > & addressing() const
Return the list addressing.
label size() const
Return the number of elements in the UList.
static label negIndex(const label)
const UList< T > & negList() const
BiIndirectList(const UList< T > &posList, const UList< T > &negList, const labelUList &)
Construct given the complete lists and the addressing array.