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();
133 inline autoPtr<CompactListList<T, Container>>
clone()
const;
144 inline bool empty()
const;
147 inline const List<label>&
offsets()
const;
153 inline const List<T>&
m()
const;
195 void transfer(CompactListList<T, Container>&);
228 inline void operator=(CompactListList<T, Container>&&);
238 friend Istream&
operator>> <
T, Container>
241 CompactListList<T, Container>&
245 friend Ostream& operator<< <T, Container>
248 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.
const List< T > & m() const
Return the packed matrix of data.
void clear()
Clear the CompactListList, i.e. set sizes to zero.
UList< label > labelUList
void transfer(CompactListList< T, Container > &)
Transfer the contents of the argument CompactListList.
labelList sizes() const
Return sizes (to be used e.g. for construction)
label size() const
Return the primary size, i.e. the number of rows.
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.
void setSize(const label mRows)
Reset size of CompactListList.
autoPtr< CompactListList< T, Container > > clone() const
Clone.
void operator=(CompactListList< T, Container > &&)
Move assignment operator.
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)
label index(const label row, const label col) const
Return index into m.
List< Container > operator()() const
Return as List<Container>
label whichRow(const label index) const
Get row for index into m.
bool empty() const
Return true if the number of rows is zero.