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>
175 template<
class T,
class Container>
182 template<
class T,
class Container>
193 template<
class T,
class Container>
201 this->
setSize(mRows, nData, t);
205 template<
class T,
class Container>
217 template<
class T,
class Container>
223 label start = offsets_[i];
224 return UList<T>(m_.begin() + start, offsets_[i+1] - start);
228 template<
class T,
class Container>
235 label start = offsets_[i];
238 const_cast<T*
>(m_.begin() + start),
239 offsets_[i+1] - start
244 template<
class T,
class Container>
251 return m_[
index(i, j)];
255 template<
class T,
class Container>
262 return m_[
index(i, j)];
266 template<
class T,
class Container>
A simple container for copying or transferring objects of type <T>.
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.
Xfer< T > xferMove(T &)
Construct by transferring the contents of the arg.
void operator=(const T &)
Assignment of all entries to the given value.
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 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.
Xfer< CompactListList< T, Container > > xfer()
Transfer the contents to the Xfer container.