Public Member Functions | Static Public Member Functions | Private Attributes
BiIndirectList< T > Class Template Reference

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

Collaboration diagram for BiIndirectList< T >:
Collaboration graph
[legend]

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, const Xfer< List< label > > &)
 Construct given the complete list and by transferring 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...
 
void resetAddressing (const Xfer< List< label > > &)
 
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= (const UList< T > &)
 Assignment from 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)
 

Private Attributes

UList< T > & posList_
 
UList< T > & negList_
 
List< labeladdressing_
 

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,
const Xfer< List< label > > &  addr 
)
inline

Construct given the complete list and by transferring addressing.

Definition at line 44 of file BiIndirectListI.H.

Member Function Documentation

◆ size()

Foam::label size
inline

Return the number of elements in the list.

Definition at line 59 of file BiIndirectListI.H.

◆ empty()

bool empty
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
inline

Definition at line 73 of file BiIndirectListI.H.

◆ negList()

const Foam::UList< T > & negList
inline

Definition at line 80 of file BiIndirectListI.H.

◆ addressing()

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

Return the list addressing.

Definition at line 87 of file BiIndirectListI.H.

◆ posIndex()

Foam::label posIndex ( const label  i)
inlinestatic

Calculate index given whether index is into posList or negList.

Definition at line 115 of file BiIndirectListI.H.

◆ negIndex()

Foam::label negIndex ( const label  i)
inlinestatic

Definition at line 122 of file BiIndirectListI.H.

◆ resetAddressing() [1/2]

void resetAddressing ( const labelUList addr)
inline

Reset addressing.

Definition at line 96 of file BiIndirectListI.H.

◆ resetAddressing() [2/2]

void resetAddressing ( const Xfer< List< label > > &  addr)
inline

Definition at line 106 of file BiIndirectListI.H.

◆ operator()()

Foam::List< T > operator()
inline

Return the addressed elements as a List.

Definition at line 131 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 145 of file BiIndirectListI.H.

◆ operator[]() [2/2]

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

Return const access to an element.

Definition at line 161 of file BiIndirectListI.H.

◆ operator=() [1/2]

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

Assignment from UList of addressed elements.

Definition at line 177 of file BiIndirectListI.H.

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

Here is the call graph for this function:

◆ operator=() [2/2]

void operator= ( const T t)
inline

Assignment of all entries to the given value.

Definition at line 196 of file BiIndirectListI.H.

References forAll.

Field Documentation

◆ posList_

UList<T>& posList_
private

Definition at line 53 of file BiIndirectList.H.

◆ negList_

UList<T>& negList_
private

Definition at line 54 of file BiIndirectList.H.

◆ addressing_

List<label> addressing_
private

Definition at line 55 of file BiIndirectList.H.


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