Go to the documentation of this file.
34 template<
class T,
class Container>
41 template<
class T,
class Container>
54 template<
class T,
class Container>
68 template<
class T,
class Container>
75 offsets_(lst.offsets_),
80 template<
class T,
class Container>
90 template<
class T,
class Container>
98 offsets_(lst.offsets_, reuse),
103 template<
class T,
class Container>
113 template<
class T,
class Container>
117 return NullObjectRef<CompactListList<T, Container>>();
121 template<
class T,
class Container>
128 template<
class T,
class Container>
135 template<
class T,
class Container>
143 template<
class T,
class Container>
150 template<
class T,
class Container>
158 template<
class T,
class Container>
165 template<
class T,
class Container>
172 return offsets_[i] + j;
176 template<
class T,
class Container>
180 if (i < 0 || i >= m_.size())
183 <<
"Index " << i <<
" outside 0.." << m_.size()
191 template<
class T,
class Container>
198 return i - index(row, 0);
202 template<
class T,
class Container>
209 template<
class T,
class Container>
220 template<
class T,
class Container>
228 this->
setSize(mRows, nData, t);
232 template<
class T,
class Container>
244 template<
class T,
class Container>
250 const label start = offsets_[i];
251 return UList<T>(m_.begin() + start, offsets_[i+1] - start);
255 template<
class T,
class Container>
262 const label start = offsets_[i];
265 const_cast<T*
>(m_.begin() + start),
266 offsets_[i+1] - start
271 template<
class T,
class Container>
278 return m_[index(i, j)];
282 template<
class T,
class Container>
289 return m_[index(i, j)];
293 template<
class T,
class Container>
300 template<
class T,
class Container>
312 offsets_ = lst.offsets_,
317 template<
class T,
class Container>
const List< label > & offsets() const
Return the offset table (= size()+1)
const List< T > & m() const
Return the packed matrix of data.
void operator=(const T &val)
Assignment of all entries to the given value.
points setSize(newPointi)
label whichRow(const label index) const
Get row for index into m.
A packed storage unstructured matrix of objects of type <T> using an offset table for access.
bool empty() const noexcept
True if the number of rows is zero.
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.
label findLower(const ListType &input, const T &val, const label start, const ComparePredicate &comp)
friend Ostream & operator(Ostream &, const CompactListList< T, Container > &)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
static const CompactListList< T, Container > & null()
Return a null CompactListList.
errorManip< error > abort(error &err)
label index(const label row, const label col) const
Return index into m.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
CompactListList()
Null constructor.
label size() const noexcept
The primary size (the number of rows)
Various functions to operate on Lists.
autoPtr< CompactListList< T, Container > > clone() const
Clone.