57 return NullObjectRef<UCompactListList<T>>();
64 return offsets_.size() - 1;
111 offsets_.shallowCopy(l.offsets_);
112 m_.shallowCopy(l.m_);
122 offsets_.deepCopy(l.offsets_);
134 return offsets_[i] + j;
141 if (i < 0 || i >= m_.size())
144 <<
"Index " << i <<
" outside 0.." << m_.size()
159 return i - index(row, 0);
171 label start = offsets_[i];
172 return UList<T>(m_.begin() + start, offsets_[i+1] - start);
183 label start = offsets_[i];
186 const_cast<T*
>(m_.begin() + start),
187 offsets_[i+1] - start
199 return m_[index(i, j)];
210 return m_[index(i, j)];
Various functions to operate on Lists.
Unallocated base class of CompactListList.
friend Ostream & operator(Ostream &, const UCompactListList< T > &)
const UList< label > & offsets() const
Return the offset table (= size()+1)
const UList< T > & m() const
Return the packed matrix of data.
label size() const
Return the primary size, i.e. the number of rows.
static const UCompactListList< T > & null()
Return a null UCompactListList.
label index(const label row, const label col) const
Return index into m.
bool empty() const
Return true if the number of rows is zero.
void operator=(const T &)
Assignment of all entries to the given value.
label whichRow(const label index) const
Get row for index into m.
UCompactListList()
Null constructor.
label whichColumn(const label row, const label index) const
Get column index (j) given above row.
void shallowCopy(const UCompactListList< T > &)
Copy the ULists, but not the underlying data.
void deepCopy(const UCompactListList< T > &)
Copy the underlying data.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
label findLower(const ListType &, typename ListType::const_reference, const label stary, const BinaryOp &bop)
Find last element < given value in sorted list and return index,.
errorManip< error > abort(error &err)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)