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 List< Container > &) | |
Construct by converting given List<List<T>> More... | |
CompactListList (const label mRows, const label nData) | |
Construct given size of offset table (number of rows) More... | |
CompactListList (const label mRows, const label nData, const T &) | |
Construct given size of offset table (number of rows),. More... | |
CompactListList (const labelUList &rowSizes) | |
Construct given list of row-sizes. More... | |
CompactListList (const labelUList &rowSizes, const T &) | |
Construct given list of row-sizes. More... | |
CompactListList (const Xfer< CompactListList< T, Container >> &) | |
Construct by transferring the parameter contents. More... | |
CompactListList (CompactListList< T, Container > &, bool reuse) | |
Construct as copy or re-use as specified. More... | |
CompactListList (Istream &) | |
Construct from Istream. More... | |
autoPtr< CompactListList< T, Container > > | clone () const |
Clone. 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 List< label > & | offsets () const |
Return the offset table (= size()+1) More... | |
List< label > & | offsets () |
Return non-const access to the offset table. More... | |
const List< T > & | m () const |
Return the packed matrix of data. More... | |
List< T > & | m () |
Return non-const access to the packed matrix of data. 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... | |
labelList | sizes () const |
Return sizes (to be used e.g. for construction) More... | |
void | transfer (CompactListList< T, Container > &) |
Transfer the contents of the argument CompactListList. More... | |
Xfer< CompactListList< T, Container > > | xfer () |
Transfer the contents to the Xfer container. 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... | |
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... | |
List< Container > | operator() () const |
Return as List<Container> More... | |
void | operator= (const T &) |
Assignment of all entries to the given value. More... | |
Static Public Member Functions | |
static const CompactListList< T, Container > & | null () |
Return a null CompactListList. More... | |
Friends | |
Istream & | operator>> (Istream &, CompactListList< T, Container > &) |
Read CompactListList from Istream, discarding contents. More... | |
Ostream & | operator (Ostream &, const CompactListList< T, Container > &) |
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).
Definition at line 91 of file polyTopoChange.H.
|
inline |
Null constructor.
Definition at line 32 of file CompactListListI.H.
Referenced by CompactListList< T, Container >::CompactListList().
|
explicit |
Construct by converting given List<List<T>>
Definition at line 31 of file CompactListList.C.
References CompactListList< T, Container >::CompactListList(), forAll, k, and List< T >::size().
|
inline |
Construct given size of offset table (number of rows)
and number of data.
Definition at line 40 of file CompactListListI.H.
References CompactListList< T, Container >::CompactListList().
|
inline |
Construct given size of offset table (number of rows),.
the number of data and a value for all elements.
Definition at line 53 of file CompactListListI.H.
|
explicit |
Construct given list of row-sizes.
Definition at line 61 of file CompactListList.C.
References CompactListList< T, Container >::CompactListList(), and forAll.
CompactListList | ( | const labelUList & | rowSizes, |
const T & | t | ||
) |
Construct given list of row-sizes.
Definition at line 82 of file CompactListList.C.
References CompactListList< T, Container >::CompactListList(), and forAll.
|
explicit |
Construct by transferring the parameter contents.
Definition at line 104 of file CompactListList.C.
References CompactListList< T, Container >::CompactListList(), and CompactListList< T, Container >::transfer().
CompactListList | ( | CompactListList< T, Container > & | lst, |
bool | reuse | ||
) |
Construct as copy or re-use as specified.
Definition at line 114 of file CompactListList.C.
CompactListList | ( | Istream & | is | ) |
Construct from Istream.
Definition at line 32 of file CompactListListIO.C.
References Foam::operator>>(), and List< T >::size().
|
inlinestatic |
Return a null CompactListList.
Definition at line 80 of file CompactListListI.H.
|
inline |
Clone.
Definition at line 67 of file CompactListListI.H.
|
inline |
Return the primary size, i.e. the number of rows.
Definition at line 87 of file CompactListListI.H.
Referenced by decompositionMethod::calcCellCells(), CompactListList< T, Container >::operator()(), CompactListList< T, Container >::setSize(), and CompactListList< T, Container >::sizes().
|
inline |
Return true if the number of rows is zero.
Definition at line 94 of file CompactListListI.H.
|
inline |
Return the offset table (= size()+1)
Definition at line 102 of file CompactListListI.H.
Referenced by decompositionMethod::calcCellCells().
|
inline |
Return non-const access to the offset table.
Definition at line 109 of file CompactListListI.H.
|
inline |
Return the packed matrix of data.
Definition at line 116 of file CompactListListI.H.
Referenced by decompositionMethod::calcCellCells().
|
inline |
Return non-const access to the packed matrix of data.
Definition at line 124 of file CompactListListI.H.
References CompactListList< T, Container >::index().
void setSize | ( | const label | mRows | ) |
Reset size of CompactListList.
This form only allows contraction of the CompactListList.
Definition at line 128 of file CompactListList.C.
References Foam::abort(), CompactListList< T, Container >::clear(), Foam::FatalError, FatalErrorInFunction, Foam::nl, List< T >::setSize(), List< T >::size(), and CompactListList< T, Container >::size().
Referenced by decompositionMethod::calcCellCells(), fvMeshDistribute::printCoupleInfo(), CompactListList< T, Container >::resize(), and CompactListList< T, Container >::setSize().
Reset size of CompactListList.
Definition at line 153 of file CompactListList.C.
References CompactListList< T, Container >::setSize(), and List< T >::setSize().
Reset sizes of CompactListList and value for new elements.
Definition at line 166 of file CompactListList.C.
References List< T >::setSize().
void setSize | ( | const labelUList & | rowSizes | ) |
Reset size of CompactListList.
Definition at line 179 of file CompactListList.C.
References forAll, List< T >::setSize(), and UList< T >::size().
|
inline |
Reset size of CompactListList.
This form only allows contraction of the CompactListList.
Definition at line 176 of file CompactListListI.H.
References CompactListList< T, Container >::setSize().
Referenced by CompactListList< T, Container >::resize().
Reset size of CompactListList.
Definition at line 184 of file CompactListListI.H.
References CompactListList< T, Container >::resize(), and CompactListList< T, Container >::setSize().
Reset sizes of CompactListList and value for new elements.
Definition at line 195 of file CompactListListI.H.
References CompactListList< T, Container >::resize(), and CompactListList< T, Container >::setSize().
|
inline |
Reset size of CompactListList.
Definition at line 207 of file CompactListListI.H.
References CompactListList< T, Container >::setSize().
void clear | ( | ) |
Clear the CompactListList, i.e. set sizes to zero.
Definition at line 213 of file CompactListList.C.
References List< T >::clear(), and CompactListList< T, Container >::transfer().
Referenced by CompactListList< T, Container >::setSize().
Foam::labelList sizes | ( | ) | const |
Return sizes (to be used e.g. for construction)
Definition at line 197 of file CompactListList.C.
References forAll, List< T >::size(), and CompactListList< T, Container >::size().
void transfer | ( | CompactListList< T, Container > & | a | ) |
Transfer the contents of the argument CompactListList.
into this CompactListList and annul the argument list.
Definition at line 223 of file CompactListList.C.
References List< T >::transfer().
Referenced by CompactListList< T, Container >::clear(), and CompactListList< T, Container >::CompactListList().
|
inline |
Transfer the contents to the Xfer container.
Definition at line 169 of file CompactListListI.H.
References Foam::xferMove().
|
inline |
Return index into m.
Definition at line 132 of file CompactListListI.H.
Referenced by CompactListList< T, Container >::m(), CompactListList< T, Container >::operator()(), and CompactListList< T, Container >::whichColumn().
|
inline |
Get row for index into m.
Definition at line 142 of file CompactListListI.H.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, Foam::findLower(), and CompactListList< T, Container >::whichColumn().
|
inline |
Get column index (j) given above row.
Definition at line 158 of file CompactListListI.H.
References CompactListList< T, Container >::index().
Referenced by CompactListList< T, Container >::whichRow().
|
inline |
Return subscript-checked row as UList.
Definition at line 219 of file CompactListListI.H.
|
inline |
Return const subscript-checked row as UList.
Definition at line 231 of file CompactListListI.H.
References CompactListList< T, Container >::operator, and Foam::T().
Return subscript-checked element.
Definition at line 246 of file CompactListListI.H.
References CompactListList< T, Container >::index(), CompactListList< T, Container >::operator, and Foam::T().
Return const subscript-checked element.
Definition at line 257 of file CompactListListI.H.
References CompactListList< T, Container >::index().
Foam::List< Container > operator() | ( | ) | const |
Return as List<Container>
Definition at line 236 of file CompactListList.C.
References forAll, and CompactListList< T, Container >::size().
Assignment of all entries to the given value.
Definition at line 267 of file CompactListListI.H.
|
friend |
Read CompactListList from Istream, discarding contents.
of existing CompactListList.
|
friend |