31 template<
class T,
class Container>
38 template<
class T,
class Container>
51 template<
class T,
class Container>
65 template<
class T,
class Container>
78 template<
class T,
class Container>
82 return NullObjectRef<CompactListList<T, Container>>();
86 template<
class T,
class Container>
93 template<
class T,
class Container>
100 template<
class T,
class Container>
108 template<
class T,
class Container>
115 template<
class T,
class Container>
123 template<
class T,
class Container>
130 template<
class T,
class Container>
137 return offsets_[i] + j;
141 template<
class T,
class Container>
145 if (i < 0 || i >= m_.size())
148 <<
"Index " << i <<
" outside 0.." << m_.size()
156 template<
class T,
class Container>
163 return i -
index(row, 0);
167 template<
class T,
class Container>
174 template<
class T,
class Container>
185 template<
class T,
class Container>
193 this->
setSize(mRows, nData, t);
197 template<
class T,
class Container>
209 template<
class T,
class Container>
210 inline Foam::UList<T> Foam::CompactListList<T, Container>::operator[]
215 label start = offsets_[i];
216 return UList<T>(m_.begin() + start, offsets_[i+1] - start);
220 template<
class T,
class Container>
222 Foam::CompactListList<T, Container>::operator[]
227 label start = offsets_[i];
230 const_cast<T*
>(m_.begin() + start),
231 offsets_[i+1] - start
236 template<
class T,
class Container>
243 return m_[
index(i, j)];
247 template<
class T,
class Container>
254 return m_[
index(i, j)];
258 template<
class T,
class Container>
259 inline void Foam::CompactListList<T, Container>::operator=
268 template<
class T,
class Container>
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
#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...
const List< T > & m() const
Return the packed matrix of data.
Various functions to operate on Lists.
void transfer(CompactListList< T, Container > &)
Transfer the contents of the argument CompactListList.
label size() const
Return the primary size, i.e. the number of rows.
CompactListList()
Null constructor.
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.
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...
A packed storage unstructured matrix of objects of type <T> using an offset table for access...
void setSize(const label mRows)
Reset size of CompactListList.
autoPtr< CompactListList< T, Container > > clone() const
Clone.
void operator=(CompactListList< T, Container > &&)
Move assignment operator.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
static const CompactListList< T, Container > & null()
Return a null CompactListList.
friend Ostream & operator(Ostream &, const CompactListList< T, Container > &)
const List< label > & offsets() const
Return the offset table (= size()+1)
label index(const label row, const label col) const
Return index into m.
label whichRow(const label index) const
Get row for index into m.
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,.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
bool empty() const
Return true if the number of rows is zero.