A List with indirect addressing. More...
Public Types | |
typedef T | value_type |
Type of values the UList contains. More... | |
typedef T & | reference |
Type that can be used for storing into. More... | |
typedef const T & | const_reference |
Type that can be used for storing into. More... | |
typedef label | difference_type |
The type that can represent the difference between any two. More... | |
typedef label | size_type |
The type that can represent the size of a UList. More... | |
Public Member Functions | |
UIndirectList (const UList< T > &, const labelUList &) | |
Construct given the complete list and the addressing array. More... | |
UIndirectList (const UIndirectList< T > &)=default | |
Copy constructor. More... | |
label | size () const |
Return the number of elements in the list. More... | |
bool | empty () const |
Return true if the list is empty (ie, size() is zero). More... | |
T & | first () |
Return the first element of the list. More... | |
const T & | first () const |
Return first element of the list. More... | |
T & | last () |
Return the last element of the list. More... | |
const T & | last () const |
Return the last element of the list. More... | |
label | fcIndex (const label i) const |
Return the forward circular index, i.e. the next index. More... | |
label | rcIndex (const label i) const |
Return the reverse circular index, i.e. the previous index. More... | |
const UList< T > & | completeList () const |
Return the complete list. More... | |
const List< label > & | addressing () const |
Return the list addressing. More... | |
List< T > | operator() () const |
Return the addressed elements as a List. More... | |
T & | operator[] (const label) |
Return non-const access to an element. More... | |
const T & | operator[] (const label) const |
Return const access to an element. More... | |
void | operator= (const UList< T > &) |
Assignment to UList of addressed elements. More... | |
void | operator= (const UIndirectList< T > &) |
Assignment to UIndirectList of addressed elements. More... | |
void | operator= (const T &) |
Assignment of all entries to the given value. More... | |
Friends | |
Ostream & | operator (Ostream &, const UIndirectList< T > &) |
Write UIndirectList to Ostream. More... | |
A List with indirect addressing.
Like IndirectList but does not store addressing.
Note the const_cast of the completeList. This is so we can use it both on const and non-const lists. Alternative would be to have a const_ variant etc.
Definition at line 106 of file fvMatrix.H.
typedef T value_type |
Type of values the UList contains.
Definition at line 139 of file UIndirectList.H.
Type that can be used for storing into.
UList::value_type objects.
Definition at line 143 of file UIndirectList.H.
typedef const T& const_reference |
Type that can be used for storing into.
constant UList::value_type objects
Definition at line 147 of file UIndirectList.H.
typedef label difference_type |
The type that can represent the difference between any two.
UList iterator objects.
Definition at line 151 of file UIndirectList.H.
The type that can represent the size of a UList.
Definition at line 154 of file UIndirectList.H.
|
inline |
Construct given the complete list and the addressing array.
Definition at line 30 of file UIndirectListI.H.
|
default |
Copy constructor.
|
inline |
Return the number of elements in the list.
Definition at line 43 of file UIndirectListI.H.
Referenced by DynamicList< Foam::triFace >::append(), List< Field< scalar > >::append(), mappedPatchBase::calcMapping(), UIndirectList< Foam::Vector >::operator=(), List< Field< scalar > >::operator=(), PackedList< 2 >::operator=(), combineFaces::setRefinement(), and faceZoneSet::updateSet().
|
inline |
Return true if the list is empty (ie, size() is zero).
Definition at line 50 of file UIndirectListI.H.
|
inline |
Return the first element of the list.
Definition at line 57 of file UIndirectListI.H.
|
inline |
Return first element of the list.
Definition at line 64 of file UIndirectListI.H.
|
inline |
Return the last element of the list.
Definition at line 71 of file UIndirectListI.H.
|
inline |
Return the last element of the list.
Definition at line 78 of file UIndirectListI.H.
|
inline |
Return the forward circular index, i.e. the next index.
which returns to the first at the end of the list
Definition at line 85 of file UIndirectListI.H.
|
inline |
Return the reverse circular index, i.e. the previous index.
which returns to the last at the beginning of the list
Definition at line 92 of file UIndirectListI.H.
|
inline |
Return the complete list.
Definition at line 99 of file UIndirectListI.H.
|
inline |
Return the list addressing.
Definition at line 106 of file UIndirectListI.H.
|
inline |
Return the addressed elements as a List.
Definition at line 115 of file UIndirectListI.H.
Return non-const access to an element.
Definition at line 129 of file UIndirectListI.H.
Return const access to an element.
Definition at line 136 of file UIndirectListI.H.
Assignment to UList of addressed elements.
Definition at line 143 of file UIndirectListI.H.
|
inline |
Assignment to UIndirectList of addressed elements.
Definition at line 162 of file UIndirectListI.H.
Assignment of all entries to the given value.
Definition at line 181 of file UIndirectListI.H.
|
friend |
Write UIndirectList to Ostream.
Binary output is currently still a bit of a problem