Public Member Functions | Static Public Member Functions | Friends | List of all members
CompactListList Class Reference

A packed storage unstructured matrix of objects of type <T> using an offset table for access. More...

Public Member Functions

 CompactListList ()
 
 CompactListList (const List< Container > &)
 
 CompactListList (const label mRows, const label nData)
 
 CompactListList (const label mRows, const label nData, const T &)
 
 CompactListList (const labelUList &rowSizes)
 
 CompactListList (const labelUList &rowSizes, const T &)
 
 CompactListList (const CompactListList< T, Container > &lst)
 
 CompactListList (CompactListList< T, Container > &&lst)
 
 CompactListList (CompactListList< T, Container > &list, bool reuse)
 
 CompactListList (Istream &)
 
autoPtr< CompactListList< T, Container > > clone () const
 
label size () const noexcept
 
bool empty () const noexcept
 
const List< label > & offsets () const
 
List< label > & offsets ()
 
const List< T > & m () const
 
List< T > & m ()
 
void setSize (const label mRows)
 
void setSize (const label mRows, const label nData)
 
void setSize (const label mRows, const label nData, const T &)
 
void setSize (const labelUList &rowSizes)
 
void resize (const label mRows)
 
void resize (const label mRows, const label nData)
 
void resize (const label mRows, const label nData, const T &)
 
void resize (const labelUList &rowSizes)
 
void clear ()
 
labelList sizes () const
 
void swap (CompactListList< T, Container > &other)
 
void transfer (CompactListList< T, Container > &list)
 
label index (const label row, const label col) const
 
label whichRow (const label index) const
 
label whichColumn (const label row, const label index) const
 
UList< Toperator[] (const label i)
 
const UList< Toperator[] (const label i) const
 
Toperator() (const label i, const label j)
 
const Toperator() (const label i, const label j) const
 
List< Container > operator() () const
 
void operator= (const T &val)
 
void operator= (const CompactListList< T, Container > &lst)
 
void operator= (CompactListList< T, Container > &&lst)
 

Static Public Member Functions

static const CompactListList< T, Container > & null ()
 

Friends

Istreamoperator>> (Istream &, CompactListList< T, Container > &)
 
Ostreamoperator (Ostream &, const CompactListList< T, Container > &)
 

Detailed Description

A packed storage unstructured matrix of objects of type <T> using an offset table for access.

The offset table is the size of the number of rows+1 whose elements are the accumulated sizes of the rows, i.e.

Storage is allocated on free-store during construction.

As a special case a null-constructed CompactListList has an empty offsets_ (instead of size 1).

Source files

Definition at line 59 of file CompactListList.H.

Constructor & Destructor Documentation

◆ CompactListList() [1/10]

CompactListList ( )
inline

Definition at line 28 of file CompactListListI.H.

◆ CompactListList() [2/10]

CompactListList ( const List< Container > &  )
explicit

◆ CompactListList() [3/10]

CompactListList ( const label  mRows,
const label  nData 
)
inline

Definition at line 36 of file CompactListListI.H.

◆ CompactListList() [4/10]

CompactListList ( const label  mRows,
const label  nData,
const T  
)
inline

◆ CompactListList() [5/10]

CompactListList ( const labelUList rowSizes)
explicit

Definition at line 57 of file CompactListList.C.

References forAll.

◆ CompactListList() [6/10]

CompactListList ( const labelUList rowSizes,
const T  
)

◆ CompactListList() [7/10]

CompactListList ( const CompactListList< T, Container > &  lst)
inline

Definition at line 63 of file CompactListListI.H.

◆ CompactListList() [8/10]

CompactListList ( CompactListList< T, Container > &&  lst)
inline

Definition at line 75 of file CompactListListI.H.

◆ CompactListList() [9/10]

CompactListList ( CompactListList< T, Container > &  list,
bool  reuse 
)
inline

Definition at line 85 of file CompactListListI.H.

◆ CompactListList() [10/10]

Member Function Documentation

◆ null()

const Foam::CompactListList< T, Container > & null ( )
inlinestatic

Definition at line 113 of file CompactListListI.H.

◆ clone()

Foam::autoPtr< Foam::CompactListList< T, Container > > clone ( ) const
inline

Definition at line 103 of file CompactListListI.H.

References Foam::New().

Here is the call graph for this function:

◆ size()

Foam::label size ( ) const
inlinenoexcept

Definition at line 120 of file CompactListListI.H.

Referenced by decompositionMethod::calcCellCells().

Here is the caller graph for this function:

◆ empty()

bool empty ( ) const
inlinenoexcept

Definition at line 127 of file CompactListListI.H.

◆ offsets() [1/2]

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

◆ offsets() [2/2]

Foam::List< Foam::label > & offsets ( )
inline

Definition at line 142 of file CompactListListI.H.

◆ m() [1/2]

const Foam::List< T > & m ( ) const
inline

Definition at line 149 of file CompactListListI.H.

Referenced by decompositionMethod::calcCellCells(), metisLikeDecomp::decompose(), and decompositionInformation::decompositionInformation().

Here is the caller graph for this function:

◆ m() [2/2]

Foam::List< T > & m ( )
inline

Definition at line 157 of file CompactListListI.H.

◆ setSize() [1/4]

void setSize ( const label  mRows)

Definition at line 101 of file CompactListList.C.

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

Referenced by decompositionMethod::calcCellCells().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSize() [2/4]

void setSize ( const label  mRows,
const label  nData 
)

Definition at line 126 of file CompactListList.C.

◆ setSize() [3/4]

void setSize ( const label  mRows,
const label  nData,
const T  
)

◆ setSize() [4/4]

void setSize ( const labelUList rowSizes)

Definition at line 152 of file CompactListList.C.

References forAll, and UList::size().

Here is the call graph for this function:

◆ resize() [1/4]

void resize ( const label  mRows)
inline

Definition at line 201 of file CompactListListI.H.

References setSize().

Here is the call graph for this function:

◆ resize() [2/4]

void resize ( const label  mRows,
const label  nData 
)
inline

Definition at line 209 of file CompactListListI.H.

References setSize().

Here is the call graph for this function:

◆ resize() [3/4]

void resize ( const label  mRows,
const label  nData,
const T  
)
inline

◆ resize() [4/4]

void resize ( const labelUList rowSizes)
inline

Definition at line 232 of file CompactListListI.H.

References setSize().

Here is the call graph for this function:

◆ clear()

void clear ( )

Definition at line 186 of file CompactListList.C.

◆ sizes()

Foam::labelList sizes ( ) const

Definition at line 170 of file CompactListList.C.

References forAll.

◆ swap()

void swap ( CompactListList< T, Container > &  other)

Definition at line 196 of file CompactListList.C.

◆ transfer()

void transfer ( CompactListList< T, Container > &  list)

Definition at line 213 of file CompactListList.C.

References clear().

Here is the call graph for this function:

◆ index()

Foam::label index ( const label  row,
const label  col 
) const
inline

Definition at line 165 of file CompactListListI.H.

◆ whichRow()

Foam::label whichRow ( const label  index) const
inline

Definition at line 175 of file CompactListListI.H.

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

Here is the call graph for this function:

◆ whichColumn()

Foam::label whichColumn ( const label  row,
const label  index 
) const
inline

Definition at line 191 of file CompactListListI.H.

◆ operator[]() [1/2]

Foam::UList< T > operator[] ( const label  i)
inline

Definition at line 244 of file CompactListListI.H.

◆ operator[]() [2/2]

const Foam::UList< T > operator[] ( const label  i) const
inline

Definition at line 256 of file CompactListListI.H.

References Foam::T().

Here is the call graph for this function:

◆ operator()() [1/3]

T & operator() ( const label  i,
const label  j 
)
inline

Definition at line 271 of file CompactListListI.H.

◆ operator()() [2/3]

const T & operator() ( const label  i,
const label  j 
) const
inline

Definition at line 282 of file CompactListListI.H.

◆ operator()() [3/3]

Foam::List< Container > operator() ( ) const

Definition at line 230 of file CompactListList.C.

References forAll.

◆ operator=() [1/3]

void operator= ( const T val)
inline

Definition at line 292 of file CompactListListI.H.

◆ operator=() [2/3]

void operator= ( const CompactListList< T, Container > &  lst)
inline

Definition at line 300 of file CompactListListI.H.

◆ operator=() [3/3]

void operator= ( CompactListList< T, Container > &&  lst)
inline

Definition at line 317 of file CompactListListI.H.

Friends And Related Function Documentation

◆ operator>>

Istream& operator>> ( Istream ,
CompactListList< T, Container > &   
)
friend

◆ operator

Ostream& operator ( Ostream ,
const CompactListList< T, Container > &   
)
friend

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