38#ifndef Foam_BiIndirectList_H
39#define Foam_BiIndirectList_H
88 bool empty()
const noexcept {
return addr_.empty(); }
103 static label
posIndex(
const label i)
noexcept {
return i; }
104 static label
negIndex(
const label i)
noexcept {
return (-i-1); }
BiIndirectList(const UList< T > &posList, const UList< T > &negList, const labelUList &addr)
Construct given the complete lists and the addressing array.
bool empty() const noexcept
True if the list is empty (ie, size() is zero).
const UList< T > & negList() const noexcept
The list of negative values (without addressing).
static label negIndex(const label i) noexcept
const labelList & addressing() const noexcept
The addressing used for the list.
List< T > list() const
Return the addressed elements as a List.
void operator=(const UList< T > &ae)
Assignment to UList of addressed elements.
void resetAddressing(const labelUList &addr)
Copy reset addressing.
label size() const noexcept
The number of elements in the list.
const UList< T > & posList() const noexcept
The list of positive values (without addressing).
static label posIndex(const label i) noexcept
Calculate index given whether index is into posList or negList.
T & operator[](const label i)
Return non-const access to an element.
List< T > operator()() const
Return the addressed elements as a List.
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...
List< label > labelList
A List of labels.
UList< label > labelUList
A UList of labels.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)