Go to the documentation of this file.
49 #ifndef CompactListList_H
50 #define CompactListList_H
61 template<
class T,
class Container>
class CompactListList;
63 template<
class T,
class Container> Istream&
operator>>
66 CompactListList<T, Container>&
68 template<
class T,
class Container> Ostream&
operator<<
71 const CompactListList<T, Container>&
79 template<
class T,
class Container = List<T> >
143 inline bool empty()
const;
236 friend Istream&
operator>> <
T, Container>
243 friend Ostream& operator<< <T, Container>
const List< label > & offsets() const
Return the offset table (= size()+1)
const List< T > & m() const
Return the packed matrix of data.
List< Container > operator()() const
Return as List<Container>
label whichRow(const label index) const
Get row for index into m.
A packed storage unstructured matrix of objects of type <T> using an offset table for access.
void operator=(const T &)
Assignment of all entries to the given value.
bool empty() const
Return true if the number of rows is zero.
UList< T > operator[](const label i)
Return subscript-checked row as UList.
A simple container for copying or transferring objects of type <T>.
void resize(const label nRows)
Reset size of CompactListList.
label whichColumn(const label row, const label index) const
Get column index (j) given above row.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
void clear()
Clear the CompactListList, i.e. set sizes to zero.
void transfer(CompactListList< T, Container > &)
Transfer the contents of the argument CompactListList.
label index(const label row, const label col) const
Return index into m.
List< T > m_
Packed matrix of data.
void setSize(const label nRows)
Reset size of CompactListList.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
labelList sizes() const
Return sizes (to be used e.g. for construction)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
label size() const
Return the primary size, i.e. the number of rows.
CompactListList()
Null constructor.
Xfer< CompactListList< T, Container > > xfer()
Transfer the contents to the Xfer container.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
autoPtr< CompactListList< T, Container > > clone() const
Clone.
List< label > offsets_
Offset table.