Go to the documentation of this file.
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(nRows, 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>
const List< label > & offsets() const
Return the offset table (= size()+1)
const List< T > & m() const
Return the packed matrix of data.
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.
void operator=(const T &)
Assignment of all entries to the given value.
bool empty() const
Return true if the number of rows is zero.
A simple container for copying or transferring objects of type <T>.
void resize(const label nRows)
Reset size of CompactListList.
label whichColumn(const label row, const label index) const
Get column index (j) given above row.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
friend Ostream & operator(Ostream &, const CompactListList< T, Container > &)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
label findLower(const ListType &, typename ListType::const_reference, const label start, const BinaryOp &bop)
Find last element < given value in sorted list and return index,.
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.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Xfer< T > xferMove(T &)
Construct by transferring the contents of the arg.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
label size() const
Return the primary size, i.e. the number of rows.
CompactListList()
Null constructor.
Xfer< CompactListList< T, Container > > xfer()
Transfer the contents to the Xfer container.
Various functions to operate on Lists.
autoPtr< CompactListList< T, Container > > clone() const
Clone.