42 if (len == this->size_)
57 if (is_contiguous<T>::value)
61 static_cast<void*
>(nv), this->v_,
overlap*
sizeof(
T)
68 for (label i = 0; i <
overlap; ++i)
70 nv[i] = std::move(vp[i]);
105 <<
"bad size " << len
121 <<
"bad size " << len
130 for (label i=0; i < len; ++i)
146 <<
"bad size " << len
155 for (label i=0; i < len; ++i)
177 this->v_[0] = std::move(val);
193 UList<
T>(nullptr, a.size_)
195 const label len = this->size_;
206 static_cast<void*
>(this->v_), a.v_, this->size_bytes()
214 for (label i = 0; i < len; ++i)
226 UList<
T>(nullptr, a.size_)
228 const label len = this->size_;
239 static_cast<void*
>(this->v_), a.v_, this->
size_bytes()
247 for (label i = 0; i < len; ++i)
259 UList<
T>(nullptr, a.size_)
270 const label len = this->size_;
289 for (label i = 0; i < len; ++i)
301 UList<
T>(nullptr, indices.size())
303 const label len = indices.
size();
311 for (label i=0; i < len; ++i)
313 vp[i] = list[indices[i]];
329 const label len = label(
N);
335 for (label i=0; i < len; ++i)
337 vp[i] = list[indices[i]];
356 UList<
T>(nullptr, list.size())
366 List<
T>(list.begin(), list.end(), list.size())
374 UList<
T>(nullptr, list.size())
384 List<
T>(list.begin(), list.end(), list.size())
434 label idx = this->size_;
456 this->size_ = list.size_;
470 transfer(
static_cast<List<T>&
>(list));
489 const label len = this->size_;
498 static_cast<void*
>(this->v_), a.v_, this->size_bytes()
506 for (label i = 0; i < len; ++i)
523 operator=(
static_cast<const UList<T>&
>(list));
530 const label len = list.size();
536 T* iter = this->begin();
538 for (
const T& val : list)
551 reAlloc(
static_cast<label
>(
N));
553 T* iter = this->begin();
555 for (
const T& val : list)
567 const label len = list.
size();
575 for (label i=0; i < len; ++i)
586 const label len = list.size();
592 T* iter = this->begin();
594 for (
const T& val : list)
626 label len = list.
size();
630 for (
T* iter = this->begin(); len--; ++iter)
632 *iter = std::move(list.removeHead());
664template<
class T,
class ListComparePredicate>
669 const ListComparePredicate& comp
677 for (label& item : order)
Macros for accessing List elements.
#define List_ACCESS(type, f, fp)
#define List_CONST_ACCESS(type, f, fp)
Non-intrusive singly-linked list.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
DynamicList< T, SizeMin > & shrink()
Shrink the allocated space to the number of elements used.
void clearStorage()
Clear the list and delete storage.
virtual bool resize()
Resize the ODE solver.
A 1D vector of objects of type <T> with a fixed length <N>.
Base for lists with indirect addressing, templated on the list contents type and the addressing type....
label size() const noexcept
The number of elements in the list.
Template class for non-intrusive linked lists.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void transfer(List< T > &list)
void resize_nocopy(const label len)
Adjust allocated size of list without necessarily.
void operator=(const UList< T > &a)
Assignment to UList operator. Takes linear time.
constexpr List() noexcept
Default construct.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void size(const label n)
Older name for setAddressableSize.
std::streamsize size_bytes() const noexcept
Number of contiguous bytes for the List data.
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
transferModelList & transfer()
Transfer.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const cellCellStencilObject & overlap
labelList sortedOrder(const UList< T > &input)
Return the (stable) sort order for the list.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
errorManip< error > abort(error &err)
static constexpr const zero Zero
Global zero (0)
void stableSort(UList< T > &list)
Stable sort the list.
A list compare binary predicate for normal sort.
A template class to specify that a data type can be considered as being contiguous in memory.
const Vector< label > N(dict.get< Vector< label > >("N"))