37 #ifndef UCompactListList_H 38 #define UCompactListList_H 49 template<
class T>
class UCompactListList;
51 template<
class T> Ostream& operator<<(Ostream&, const UCompactListList<T>&);
58 class UCompactListList
63 UList<label> offsets_;
74 inline static const UCompactListList<T>&
null();
94 inline bool empty()
const;
97 inline const UList<label>&
offsets()
const;
100 inline UList<label>&
offsets();
103 inline const UList<T>&
m()
const;
106 inline UList<T>&
m();
110 inline void shallowCopy(
const UCompactListList<T>&);
113 inline void deepCopy(
const UCompactListList<T>&);
128 template<
class Container = List<T>>
129 List<Container>
list()
const;
153 friend Ostream& operator<< <T>
156 const UCompactListList<T>&
const UList< T > & m() const
Return the packed matrix of data.
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
label size() const
Return the primary size, i.e. the number of rows.
T & operator()(const label i, const label j)
Return subscript-checked element.
void shallowCopy(const UCompactListList< T > &)
Copy the ULists, but not the underlying data.
List< Container > list() const
Convert to List<Container>
labelList sizes() const
Return sizes (to be used e.g. for construction)
List< label > labelList
A List of labels.
UList< T > operator[](const label i)
Return subscript-checked row as UList.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
label index(const label row, const label col) const
Return index into m.
UCompactListList()
Null constructor.
void operator=(const T &)
Assignment of all entries to the given value.
const UList< label > & offsets() const
Return the offset table (= size()+1)
void deepCopy(const UCompactListList< T > &)
Copy the underlying data.
label whichRow(const label index) const
Get row for index into m.
static const UCompactListList< T > & null()
Return a null UCompactListList.
label whichColumn(const label row, const label index) const
Get column index (j) given above row.
bool empty() const
Return true if the number of rows is zero.