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)];
friend Ostream & operator(Ostream &, const UCompactListList< T > &)
const UList< T > & m() const
Return the packed matrix of data.
label size() const
Return the primary size, i.e. the number of rows.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void shallowCopy(const UCompactListList< T > &)
Copy the ULists, but not the underlying data.
Various functions to operate on Lists.
errorManip< error > abort(error &err)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
label index(const label row, const label col) const
Return index into m.
Unallocated base class of CompactListList.
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,.
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.