A packed storage unstructured matrix of objects of type <T> using an offset table for access. More...
Public Member Functions | |
CompactListList () | |
Null constructor. More... | |
CompactListList (const UList< label > &offsets, const UList< T > &m) | |
Construct from components. More... | |
CompactListList (CompactListList< T > &, bool reuse) | |
Construct as copy or re-use as specified. More... | |
CompactListList (CompactListList< T > &&) | |
Move constructor. More... | |
CompactListList (const label mRows, const label nData, const T &) | |
Construct given size of offset table (number of rows),. More... | |
template<class Container > | |
CompactListList (const List< Container > &) | |
Construct by converting given List<Container> More... | |
CompactListList (const labelUList &rowSizes, const T &) | |
Construct given list of row-sizes and a value for all elements. More... | |
CompactListList (Istream &) | |
Construct from Istream. More... | |
autoPtr< CompactListList< T > > | clone () const |
Clone. More... | |
void | setSize (const label mRows) |
Reset size of CompactListList. More... | |
void | setSize (const label mRows, const label nData) |
Reset size of CompactListList. More... | |
void | setSize (const label mRows, const label nData, const T &) |
Reset sizes of CompactListList and value for new elements. More... | |
void | setSize (const labelUList &rowSizes) |
Reset size of CompactListList. More... | |
void | resize (const label mRows) |
Reset size of CompactListList. More... | |
void | resize (const label mRows, const label nData) |
Reset size of CompactListList. More... | |
void | resize (const label mRows, const label nData, const T &) |
Reset sizes of CompactListList and value for new elements. More... | |
void | resize (const labelUList &rowSizes) |
Reset size of CompactListList. More... | |
void | clear () |
Clear the CompactListList, i.e. set sizes to zero. More... | |
void | transfer (CompactListList< T > &) |
Transfer the contents of the argument CompactListList. More... | |
void | shallowCopy (const UCompactListList< T > &)=delete |
Disallow shallowCopy. More... | |
Public Member Functions inherited from UCompactListList< T > | |
UCompactListList () | |
Null constructor. More... | |
UCompactListList (const UList< label > &offsets, const UList< T > &m) | |
Construct from components. More... | |
label | size () const |
Return the primary size, i.e. the number of rows. More... | |
bool | empty () const |
Return true if the number of rows is zero. More... | |
const UList< label > & | offsets () const |
Return the offset table (= size()+1) More... | |
UList< label > & | offsets () |
Return non-const access to the offset table. More... | |
const UList< T > & | m () const |
Return the packed matrix of data. More... | |
UList< T > & | m () |
Return non-const access to the packed matrix of data. More... | |
void | shallowCopy (const UCompactListList< T > &) |
Copy the ULists, but not the underlying data. More... | |
void | deepCopy (const UCompactListList< T > &) |
Copy the underlying data. More... | |
label | index (const label row, const label col) const |
Return index into m. More... | |
label | whichRow (const label index) const |
Get row for index into m. More... | |
label | whichColumn (const label row, const label index) const |
Get column index (j) given above row. More... | |
labelList | sizes () const |
Return sizes (to be used e.g. for construction) More... | |
template<class Container = List<T>> | |
List< Container > | list () const |
Convert to List<Container> More... | |
UList< T > | operator[] (const label i) |
Return subscript-checked row as UList. More... | |
const UList< T > | operator[] (const label i) const |
Return const subscript-checked row as UList. More... | |
T & | operator() (const label i, const label j) |
Return subscript-checked element. More... | |
const T & | operator() (const label i, const label j) const |
Return const subscript-checked element. More... | |
void | operator= (const T &) |
Assignment of all entries to the given value. More... | |
template<class Container > | |
Foam::List< Container > | list () const |
Static Public Member Functions | |
static const CompactListList< T > & | null () |
Return a null CompactListList. More... | |
Static Public Member Functions inherited from UCompactListList< T > | |
static const UCompactListList< T > & | null () |
Return a null UCompactListList. More... | |
Friends | |
Istream & | operator>> (Istream &, CompactListList< T > &) |
Read CompactListList from Istream, discarding contents. More... | |
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.
Definition at line 91 of file polyTopoChange.H.
|
inline |
Null constructor.
Definition at line 32 of file CompactListListI.H.
References UCompactListList< T >::shallowCopy().
Referenced by CompactListList< T >::CompactListList().
|
inline |
Construct from components.
Definition at line 44 of file CompactListListI.H.
|
inline |
Construct as copy or re-use as specified.
Definition at line 56 of file CompactListListI.H.
References UCompactListList< T >::shallowCopy().
|
inline |
Move constructor.
Definition at line 67 of file CompactListListI.H.
References CompactListList< T >::CompactListList(), and CompactListList< T >::transfer().
|
inline |
Construct given size of offset table (number of rows),.
the number of data and a value for all elements.
Definition at line 75 of file CompactListListI.H.
References UCompactListList< T >::shallowCopy().
CompactListList | ( | const List< Container > & | ll | ) |
Construct by converting given List<Container>
Definition at line 32 of file CompactListList.C.
References CompactListList< T >::CompactListList(), forAll, k, UCompactListList< T >::shallowCopy(), and List< T >::size().
CompactListList | ( | const labelUList & | rowSizes, |
const T & | t | ||
) |
Construct given list of row-sizes and a value for all elements.
Definition at line 63 of file CompactListList.C.
References forAll, and UCompactListList< T >::shallowCopy().
CompactListList | ( | Istream & | is | ) |
Construct from Istream.
Definition at line 32 of file CompactListListIO.C.
References CompactListList< T >::clear(), UList< T >::empty(), and Foam::operator>>().
|
inlinestatic |
Return a null CompactListList.
Definition at line 104 of file CompactListListI.H.
|
inline |
Clone.
Definition at line 91 of file CompactListListI.H.
void setSize | ( | const label | mRows | ) |
Reset size of CompactListList.
This form only allows contraction of the CompactListList.
Definition at line 89 of file CompactListList.C.
References Foam::abort(), CompactListList< T >::clear(), Foam::FatalError, FatalErrorInFunction, Foam::nl, List< T >::setSize(), UCompactListList< T >::shallowCopy(), UCompactListList< T >::size(), and List< T >::size().
Referenced by decompositionMethod::calcCellCells(), fvMeshDistribute::printCoupleInfo(), CompactListList< T >::resize(), and CompactListList< T >::setSize().
Reset size of CompactListList.
Definition at line 115 of file CompactListList.C.
References CompactListList< T >::setSize(), List< T >::setSize(), and UCompactListList< T >::shallowCopy().
Reset sizes of CompactListList and value for new elements.
Definition at line 129 of file CompactListList.C.
References List< T >::setSize(), and UCompactListList< T >::shallowCopy().
void setSize | ( | const labelUList & | rowSizes | ) |
Reset size of CompactListList.
Definition at line 143 of file CompactListList.C.
References forAll, List< T >::setSize(), UCompactListList< T >::shallowCopy(), and UList< T >::size().
|
inline |
Reset size of CompactListList.
This form only allows contraction of the CompactListList.
Definition at line 111 of file CompactListListI.H.
References CompactListList< T >::setSize().
Referenced by CompactListList< T >::resize().
Reset size of CompactListList.
Definition at line 119 of file CompactListListI.H.
References CompactListList< T >::resize(), and CompactListList< T >::setSize().
Reset sizes of CompactListList and value for new elements.
Definition at line 130 of file CompactListListI.H.
References CompactListList< T >::resize(), and CompactListList< T >::setSize().
|
inline |
Reset size of CompactListList.
Definition at line 142 of file CompactListListI.H.
References CompactListList< T >::setSize().
void clear | ( | ) |
Clear the CompactListList, i.e. set sizes to zero.
Definition at line 162 of file CompactListList.C.
References UCompactListList< T >::shallowCopy().
Referenced by CompactListList< T >::CompactListList(), CompactListList< T >::setSize(), and CompactListList< T >::transfer().
void transfer | ( | CompactListList< T > & | a | ) |
Transfer the contents of the argument CompactListList.
into this CompactListList and annul the argument list.
Definition at line 172 of file CompactListList.C.
References CompactListList< T >::clear(), UCompactListList< T >::shallowCopy(), and List< T >::transfer().
Referenced by CompactListList< T >::CompactListList().
|
delete |
Disallow shallowCopy.
|
friend |
Read CompactListList from Istream, discarding contents.
of existing CompactListList.