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_(list.offsets_, reuse),
108 template<
class T,
class Container>
118 template<
class T,
class Container>
122 return NullObjectRef<CompactListList<T, Container>>();
126 template<
class T,
class Container>
133 template<
class T,
class Container>
140 template<
class T,
class Container>
148 template<
class T,
class Container>
155 template<
class T,
class Container>
163 template<
class T,
class Container>
170 template<
class T,
class Container>
177 return offsets_[i] + j;
181 template<
class T,
class Container>
185 if (i < 0 || i >= m_.size())
188 <<
"Index " << i <<
" outside 0.." << m_.size()
196 template<
class T,
class Container>
203 return i - index(row, 0);
207 template<
class T,
class Container>
214 template<
class T,
class Container>
225 template<
class T,
class Container>
233 this->
setSize(mRows, nData, t);
237 template<
class T,
class Container>
249 template<
class T,
class Container>
255 const label start = offsets_[i];
256 return UList<T>(m_.begin() + start, offsets_[i+1] - start);
260 template<
class T,
class Container>
267 const label start = offsets_[i];
270 const_cast<T*
>(m_.begin() + start),
271 offsets_[i+1] - start
276 template<
class T,
class Container>
283 return m_[index(i, j)];
287 template<
class T,
class Container>
294 return m_[index(i, j)];
298 template<
class T,
class Container>
305 template<
class T,
class Container>
317 offsets_ = lst.offsets_,
322 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()
Default construct.
label size() const noexcept
The primary size (the number of rows)
Various functions to operate on Lists.
autoPtr< CompactListList< T, Container > > clone() const
Clone.