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 nRows, const label nData) | |
Construct given size of offset table (number of rows) More... | |
CompactListList (const label nRows, 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 nRows) |
Reset size of CompactListList. More... | |
void | setSize (const label nRows, const label nData) |
Reset size of CompactListList. More... | |
void | setSize (const label nRows, 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 nRows) |
Reset size of CompactListList. More... | |
void | resize (const label nRows, const label nData) |
Reset size of CompactListList. More... | |
void | resize (const label nRows, 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... | |
Private Attributes | |
label | size_ |
List< label > | offsets_ |
Offset table. More... | |
List< T > | m_ |
Packed matrix of data. 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.
|
explicit |
|
inline |
Construct given size of offset table (number of rows)
and number of data.
Definition at line 40 of file CompactListListI.H.
|
inline |
Construct given size of offset table (number of rows),.
the number of data and a value for all elements.
|
explicit |
Construct given list of row-sizes.
Definition at line 61 of file CompactListList.C.
References forAll.
CompactListList | ( | const labelUList & | rowSizes, |
const T & | |||
) |
Construct given list of row-sizes.
|
explicit |
Construct by transferring the parameter contents.
CompactListList | ( | CompactListList< T, Container > & | , |
bool | reUse | ||
) |
Construct as copy or re-use as specified.
CompactListList | ( | Istream & | ) |
Construct from Istream.
|
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(), and polyTopoChange::getCellOrder().
|
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(), main(), and polyTopoChange::makeCellCells().
|
inline |
Return non-const access to the packed matrix of data.
Definition at line 124 of file CompactListListI.H.
void setSize | ( | const label | nRows | ) |
Reset size of CompactListList.
This form only allows contraction of the CompactListList.
Definition at line 128 of file CompactListList.C.
References Foam::abort(), clear(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.
Referenced by decompositionMethod::calcCellCells(), main(), polyTopoChange::makeCellCells(), and fvMeshDistribute::sendMesh().
Reset size of CompactListList.
Definition at line 153 of file CompactListList.C.
Reset sizes of CompactListList and value for new elements.
void setSize | ( | const labelUList & | rowSizes | ) |
Reset size of CompactListList.
Definition at line 179 of file CompactListList.C.
References forAll, and UList::size().
|
inline |
Reset size of CompactListList.
This form only allows contraction of the CompactListList.
Definition at line 176 of file CompactListListI.H.
References setSize().
Referenced by main().
Reset size of CompactListList.
Definition at line 184 of file CompactListListI.H.
References setSize().
Reset sizes of CompactListList and value for new elements.
|
inline |
Reset size of CompactListList.
Definition at line 207 of file CompactListListI.H.
References setSize().
void clear | ( | ) |
Clear the CompactListList, i.e. set sizes to zero.
Definition at line 213 of file CompactListList.C.
Referenced by main().
Foam::labelList sizes | ( | ) | const |
Return sizes (to be used e.g. for construction)
Definition at line 197 of file CompactListList.C.
References forAll, and List::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 CompactListList::m_, CompactListList::offsets_, and CompactListList::size_.
Referenced by main().
|
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 polyTopoChange::makeCellCells().
|
inline |
Get row for index into m.
Definition at line 142 of file CompactListListI.H.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and Foam::findLower().
Referenced by main().
|
inline |
Get column index (j) given above row.
Definition at line 158 of file CompactListListI.H.
|
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 Foam::T().
Return subscript-checked element.
Definition at line 246 of file CompactListListI.H.
Return const subscript-checked element.
Definition at line 257 of file CompactListListI.H.
Foam::List< Container > operator() | ( | ) | const |
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 |
|
private |
Definition at line 83 of file CompactListList.H.
Referenced by CompactListList::transfer().
Offset table.
Definition at line 86 of file CompactListList.H.
Referenced by CompactListList::transfer().
Packed matrix of data.
Definition at line 89 of file CompactListList.H.
Referenced by CompactListList::transfer().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.