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 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... | |
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... | |
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 from UList of addressed elements. More... | |
void | operator= (const UIndirectList< T > &) |
Assignment from UIndirectList of addressed elements. More... | |
void | operator= (const T &) |
Assignment of all entries to the given value. More... | |
Data Fields | |
const typedef T & | const_reference |
Type that can be used for storing into. More... | |
Private Attributes | |
UList< T > & | completeList_ |
const labelUList & | addressing_ |
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 128 of file UIndirectList.H.
Type that can be used for storing into.
UList::value_type objects.
Definition at line 132 of file UIndirectList.H.
typedef label difference_type |
The type that can represent the difference between any two.
UList iterator objects.
Definition at line 140 of file UIndirectList.H.
The type that can represent the size of a UList.
Definition at line 143 of file UIndirectList.H.
|
inline |
Construct given the complete list and the addressing array.
Definition at line 30 of file UIndirectListI.H.
|
inline |
Return the number of elements in the list.
Definition at line 43 of file UIndirectListI.H.
|
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.
Referenced by SemiImplicitSource::addSup().
|
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 complete list.
Definition at line 85 of file UIndirectListI.H.
|
inline |
Return the list addressing.
Definition at line 92 of file UIndirectListI.H.
|
inline |
Return the addressed elements as a List.
Definition at line 101 of file UIndirectListI.H.
|
inline |
Assignment from UIndirectList of addressed elements.
|
friend |
Write UIndirectList to Ostream.
Binary output is currently still a bit of a problem
const typedef T& const_reference |
Type that can be used for storing into.
constant UList::value_type objects
Definition at line 136 of file UIndirectList.H.
Definition at line 63 of file UIndirectList.H.
|
private |
Definition at line 64 of file UIndirectList.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.