Go to the documentation of this file.
52 #ifndef CompactListList_H
53 #define CompactListList_H
66 template<
class T,
class Container>
Istream&
operator>>
71 template<
class T,
class Container>
Ostream&
operator<<
82 template<
class T,
class Container = List<T>>
147 inline label
size() const noexcept;
150 inline
bool empty() const noexcept;
159 inline const
List<
T>&
m() const;
169 void setSize(const label mRows);
172 void setSize(const label mRows, const label nData);
175 void setSize(const label mRows, const label nData, const
T&);
182 inline
void resize(const label mRows);
185 inline
void resize(const label mRows, const label nData);
188 inline
void resize(const label mRows, const label nData, const
T&);
209 inline label
index(const label row, const label col) const;
227 inline
T&
operator()(const label i, const label j);
230 inline const
T&
operator()(const label i, const label j) const;
272 #include "CompactListListI.H"
const List< label > & offsets() const
Return the offset table (= size()+1)
const List< T > & m() const
Return the packed matrix of data.
label whichRow(const label index) const
Get row for index into m.
void transfer(CompactListList< T, Container > &list)
Transfer contents into this and annul the argument.
A packed storage unstructured matrix of objects of type <T> using an offset table for access.
bool empty() const noexcept
True if the number of rows is zero.
label whichColumn(const label row, const label index) const
Get column index (j) given above row.
void resize(const label mRows)
Reset size of CompactListList.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
void setSize(const label mRows)
Reset size of CompactListList.
friend Ostream & operator(Ostream &, const CompactListList< T, Container > &)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
void clear()
Clear the CompactListList, i.e. set sizes to zero.
label index(const label row, const label col) const
Return index into m.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
labelList sizes() const
Return sizes (to be used e.g. for construction)
CompactListList()
Default construct.
label size() const noexcept
The primary size (the number of rows)
void swap(CompactListList< T, Container > &other)
Swap contents.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
autoPtr< CompactListList< T, Container > > clone() const
Clone.