39 posList_(const_cast<
UList<
T>&>(posList)),
40 negList_(const_cast<
UList<
T>&>(negList)),
53 posList_(const_cast<
UList<
T>&>(posList)),
54 negList_(const_cast<
UList<
T>&>(negList)),
55 addr_(
std::move(addr))
82 result[i] = operator[](i);
94 const label index = addr_[i];
96 return (index >= 0 ? posList_[index] : negList_[-index-1]);
103 const label index = addr_[i];
105 return (index >= 0 ? posList_[index] : negList_[-index-1]);
112 if (addr_.size() != ae.
size())
115 <<
"Addressing and list of addressed elements " 116 "have different sizes: " 117 << addr_.size() <<
" " << ae.
size()
123 operator[](i) = ae[i];
void size(const label n)
Older name for setAddressableSize.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
T & operator[](const label i)
Return non-const access to an element.
#define forAll(list, i)
Loop across all elements in list.
void operator=(const UList< T > &ae)
Assignment to UList of addressed elements.
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...
List< T > list() const
Return the addressed elements as a List.
BiIndirectList(const UList< T > &posList, const UList< T > &negList, const labelUList &addr)
Construct given the complete lists and the addressing array.
void resetAddressing(const labelUList &addr)
Copy reset addressing.