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 CompactListList< T, Container > &lst) | |
Copy construct. More... | |
CompactListList (CompactListList< T, Container > &&lst) | |
Move construct. More... | |
CompactListList (CompactListList< T, Container > &lst, 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 noexcept |
The primary size (the number of rows) More... | |
bool | empty () const noexcept |
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 | swap (CompactListList< T, Container > &lst) |
Swap contents. More... | |
void | transfer (CompactListList< T, Container > &lst) |
Transfer the contents of the argument CompactListList. 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 &val) |
Assignment of all entries to the given value. More... | |
void | operator= (const CompactListList< T, Container > &lst) |
Copy assignment. More... | |
void | operator= (CompactListList< T, Container > &&lst) |
Move assignment. 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 94 of file polyTopoChange.H.
|
inline |
Null constructor.
Definition at line 35 of file CompactListListI.H.
|
explicit |
Construct by converting given List<List<T>>
Definition at line 34 of file CompactListList.C.
|
inline |
Construct given size of offset table (number of rows)
and number of data.
Definition at line 43 of file CompactListListI.H.
|
inline |
Construct given size of offset table (number of rows),.
the number of data and a value for all elements.
Definition at line 56 of file CompactListListI.H.
|
explicit |
Construct given list of row-sizes.
Definition at line 64 of file CompactListList.C.
References forAll.
CompactListList | ( | const labelUList & | rowSizes, |
const T & | val | ||
) |
Construct given list of row-sizes.
Definition at line 85 of file CompactListList.C.
|
inline |
Copy construct.
Definition at line 70 of file CompactListListI.H.
|
inline |
Move construct.
Definition at line 82 of file CompactListListI.H.
|
inline |
Construct as copy or re-use as specified.
Definition at line 92 of file CompactListListI.H.
CompactListList | ( | Istream & | is | ) |
Construct from Istream.
Definition at line 34 of file CompactListListIO.C.
References Foam::operator>>().
|
inlinestatic |
Return a null CompactListList.
Definition at line 115 of file CompactListListI.H.
|
inline |
Clone.
Definition at line 105 of file CompactListListI.H.
References Foam::New().
|
inlinenoexcept |
The primary size (the number of rows)
Definition at line 122 of file CompactListListI.H.
Referenced by decompositionMethod::calcCellCells().
|
inlinenoexcept |
True if the number of rows is zero.
Definition at line 129 of file CompactListListI.H.
|
inline |
Return the offset table (= size()+1)
Definition at line 137 of file CompactListListI.H.
Referenced by decompositionMethod::calcCellCells(), metisLikeDecomp::decompose(), decompositionInformation::decompositionInformation(), and globalIndex::get().
|
inline |
Return non-const access to the offset table.
Definition at line 144 of file CompactListListI.H.
|
inline |
Return the packed matrix of data.
Definition at line 151 of file CompactListListI.H.
Referenced by decompositionMethod::calcCellCells(), metisLikeDecomp::decompose(), and decompositionInformation::decompositionInformation().
|
inline |
Return non-const access to the packed matrix of data.
Definition at line 159 of file CompactListListI.H.
void setSize | ( | const label | mRows | ) |
Reset size of CompactListList.
This form only allows contraction of the CompactListList.
Definition at line 108 of file CompactListList.C.
References Foam::abort(), clear(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.
Referenced by decompositionMethod::calcCellCells().
Reset size of CompactListList.
Definition at line 133 of file CompactListList.C.
Reset sizes of CompactListList and value for new elements.
Definition at line 146 of file CompactListList.C.
void setSize | ( | const labelUList & | rowSizes | ) |
Reset size of CompactListList.
Definition at line 159 of file CompactListList.C.
References forAll, and UList< T >::size().
|
inline |
Reset size of CompactListList.
This form only allows contraction of the CompactListList.
Definition at line 203 of file CompactListListI.H.
References setSize().
Reset size of CompactListList.
Definition at line 211 of file CompactListListI.H.
References setSize().
Reset sizes of CompactListList and value for new elements.
Definition at line 222 of file CompactListListI.H.
References setSize().
|
inline |
Reset size of CompactListList.
Definition at line 234 of file CompactListListI.H.
References setSize().
void clear | ( | ) |
Clear the CompactListList, i.e. set sizes to zero.
Definition at line 193 of file CompactListList.C.
Foam::labelList sizes | ( | ) | const |
Return sizes (to be used e.g. for construction)
Definition at line 177 of file CompactListList.C.
References forAll.
void swap | ( | CompactListList< T, Container > & | lst | ) |
Swap contents.
Definition at line 203 of file CompactListList.C.
References Foam::Swap().
void transfer | ( | CompactListList< T, Container > & | lst | ) |
Transfer the contents of the argument CompactListList.
into this CompactListList and annul the argument list.
Definition at line 220 of file CompactListList.C.
|
inline |
Return index into m.
Definition at line 167 of file CompactListListI.H.
|
inline |
Get row for index into m.
Definition at line 177 of file CompactListListI.H.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and Foam::findLower().
|
inline |
Get column index (j) given above row.
Definition at line 193 of file CompactListListI.H.
|
inline |
Return subscript-checked row as UList.
Definition at line 246 of file CompactListListI.H.
References Foam::start.
|
inline |
Return const subscript-checked row as UList.
Definition at line 258 of file CompactListListI.H.
References Foam::start, and Foam::T().
Return subscript-checked element.
Definition at line 273 of file CompactListListI.H.
Return const subscript-checked element.
Definition at line 284 of file CompactListListI.H.
Foam::List< Container > operator() | ( | ) | const |
Assignment of all entries to the given value.
Definition at line 294 of file CompactListListI.H.
References Foam::val.
|
inline |
Copy assignment.
Definition at line 302 of file CompactListListI.H.
|
inline |
Move assignment.
Definition at line 319 of file CompactListListI.H.
|
friend |
Read CompactListList from Istream, discarding contents.
of existing CompactListList.
|
friend |