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>>
98 inline static const CompactListList<T, Container>&
null();
132 inline autoPtr<CompactListList<T, Container>>
clone()
const;
143 inline bool empty()
const;
146 inline const List<label>&
offsets()
const;
152 inline const List<T>&
m()
const;
194 void transfer(CompactListList<T, Container>&);
197 inline Xfer<CompactListList<T, Container>>
xfer();
236 friend Istream&
operator>> <
T, Container>
239 CompactListList<T, Container>&
243 friend Ostream& operator<< <T, Container>
246 const CompactListList<T, Container>&
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void clear()
Clear the CompactListList, i.e. set sizes to zero.
label index(const label row, const label col) const
Return index into m.
label size() const
Return the primary size, i.e. the number of rows.
UList< label > labelUList
void transfer(CompactListList< T, Container > &)
Transfer the contents of the argument CompactListList.
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.
void operator=(const T &)
Assignment of all entries to the given value.
autoPtr< CompactListList< T, Container > > clone() const
Clone.
UList< T > operator[](const label i)
Return subscript-checked row as UList.
CompactListList()
Null constructor.
List< label > labelList
A List of labels.
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.
bool empty() const
Return true if the number of rows is zero.
void setSize(const label mRows)
Reset size of CompactListList.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
static const CompactListList< T, Container > & null()
Return a null CompactListList.
const List< label > & offsets() const
Return the offset table (= size()+1)
Xfer< CompactListList< T, Container > > xfer()
Transfer the contents to the Xfer container.
labelList sizes() const
Return sizes (to be used e.g. for construction)