BiIndirectList< T > Class Template Reference

Indexes into negList (negative index) or posList (zero or positive index). More...

Public Member Functions

 BiIndirectList (const UList< T > &posList, const UList< T > &negList, const labelUList &)
 Construct given the complete lists and the addressing array. More...
 
 BiIndirectList (const UList< T > &posList, const UList< T > &negList, List< label > &&)
 Move constructor given the complete list and by moving addressing. 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...
 
const UList< T > & posList () const
 
const UList< T > & negList () const
 
const List< label > & addressing () const
 Return the list addressing. More...
 
void resetAddressing (const labelUList &)
 Reset addressing. More...
 
List< Toperator() () const
 Return the addressed elements as a List. More...
 
Toperator[] (const label)
 Return non-const access to an element. More...
 
const Toperator[] (const label) const
 Return const access to an element. More...
 
void operator= (List< T > &&)
 Move assignment to List of addressed elements. More...
 
void operator= (const UList< T > &)
 Assignment to UList of addressed elements. More...
 
void operator= (const T &)
 Assignment of all entries to the given value. More...
 

Static Public Member Functions

static label posIndex (const label)
 Calculate index given whether index is into posList or negList. More...
 
static label negIndex (const label)
 

Detailed Description

template<class T>
class Foam::BiIndirectList< T >

Indexes into negList (negative index) or posList (zero or positive index).

Source files

Definition at line 49 of file BiIndirectList.H.

Constructor & Destructor Documentation

◆ BiIndirectList() [1/2]

BiIndirectList ( const UList< T > &  posList,
const UList< T > &  negList,
const labelUList addr 
)
inline

Construct given the complete lists and the addressing array.

Definition at line 30 of file BiIndirectListI.H.

◆ BiIndirectList() [2/2]

BiIndirectList ( const UList< T > &  posList,
const UList< T > &  negList,
List< label > &&  addr 
)
inline

Move constructor given the complete list and by moving addressing.

Definition at line 44 of file BiIndirectListI.H.

Member Function Documentation

◆ size()

Foam::label size ( ) const
inline

Return the number of elements in the list.

Definition at line 59 of file BiIndirectListI.H.

Referenced by List< Field< scalar > >::operator=().

Here is the caller graph for this function:

◆ empty()

bool empty ( ) const
inline

Return true if the list is empty (ie, size() is zero).

Definition at line 66 of file BiIndirectListI.H.

◆ posList()

const Foam::UList< T > & posList ( ) const
inline

Definition at line 73 of file BiIndirectListI.H.

◆ negList()

const Foam::UList< T > & negList ( ) const
inline

Definition at line 80 of file BiIndirectListI.H.

◆ addressing()

const Foam::List< Foam::label > & addressing ( ) const
inline

Return the list addressing.

Definition at line 87 of file BiIndirectListI.H.

References BiIndirectList< T >::resetAddressing().

Here is the call graph for this function:

◆ posIndex()

Foam::label posIndex ( const label  i)
inlinestatic

Calculate index given whether index is into posList or negList.

Definition at line 105 of file BiIndirectListI.H.

◆ negIndex()

Foam::label negIndex ( const label  i)
inlinestatic

Definition at line 112 of file BiIndirectListI.H.

◆ resetAddressing()

void resetAddressing ( const labelUList addr)
inline

Reset addressing.

Definition at line 96 of file BiIndirectListI.H.

Referenced by BiIndirectList< T >::addressing().

Here is the caller graph for this function:

◆ operator()()

Foam::List< T > operator() ( ) const
inline

Return the addressed elements as a List.

Definition at line 121 of file BiIndirectListI.H.

References forAll.

◆ operator[]() [1/2]

T & operator[] ( const label  i)
inline

Return non-const access to an element.

Definition at line 135 of file BiIndirectListI.H.

◆ operator[]() [2/2]

const T & operator[] ( const label  i) const
inline

Return const access to an element.

Definition at line 151 of file BiIndirectListI.H.

◆ operator=() [1/3]

void operator= ( List< T > &&  ae)
inline

Move assignment to List of addressed elements.

Definition at line 167 of file BiIndirectListI.H.

References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

Here is the call graph for this function:

◆ operator=() [2/3]

void operator= ( const UList< T > &  ae)
inline

Assignment to UList of addressed elements.

Definition at line 183 of file BiIndirectListI.H.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, and UList< T >::size().

Here is the call graph for this function:

◆ operator=() [3/3]

void operator= ( const T t)
inline

Assignment of all entries to the given value.

Definition at line 202 of file BiIndirectListI.H.

References forAll.


The documentation for this class was generated from the following files: