Go to the documentation of this file.
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_;
281 static_cast<void*
>(this->v_), a.v_, this->size_bytes()
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())
374 UList<
T>(nullptr, list.size())
399 template<
int SizeMin>
422 operator=(std::move(list));
443 label idx = this->size_;
465 this->size_ = list.size_;
474 template<
int SizeMin>
479 transfer(
static_cast<List<T>&
>(list));
491 transfer(
static_cast<List<T>&
>(list));
507 const label len = this->size_;
516 static_cast<void*
>(this->v_), a.v_, this->size_bytes()
524 for (label i = 0; i < len; ++i)
541 operator=(
static_cast<const UList<T>&
>(list));
548 const label len = list.size();
556 for (
const T& val : list)
569 reAlloc(
static_cast<label
>(
N));
573 for (
const T& val : list)
585 const label len = list.
size();
593 for (label i=0; i < len; ++i)
604 const label len = list.size();
612 for (
const T& val : list)
634 template<
int SizeMin>
651 label len = list.
size();
659 *iter = std::move(list.removeHead());
constexpr auto begin(C &c) -> decltype(c.begin())
Return iterator to the beginning of the container c.
void resize(const label len)
Adjust allocated size of list.
static constexpr const zero Zero
Global zero (0)
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
DynamicList< T, SizeMin > & shrink()
Shrink the allocated space to the number of elements used.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
Template class for non-intrusive linked lists.
void transfer(List< T > &list)
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
void operator=(const UList< T > &a)
Assignment to UList operator. Takes linear time.
List< T > & shrink()
Clear the indices and return a reference to the underlying List.
A list that is sorted upon construction or when explicitly requested with the sort() method.
constexpr auto end(C &c) -> decltype(c.end())
Return iterator to the end of the container c.
label size() const noexcept
The number of elements in the list.
errorManip< error > abort(error &err)
constexpr List() noexcept
Default construct.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define List_CONST_ACCESS(type, f, fp)
Non-intrusive singly-linked list.
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> with a fixed length <N>.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void clearStorage()
Clear the list and delete storage.
Base for lists with indirect addressing, templated on the list contents type and the addressing type....
const cellCellStencilObject & overlap
void size(const label n)
Older name for setAddressableSize.
const Vector< label > N(dict.get< Vector< label >>("N"))
#define List_ACCESS(type, f, fp)
A template class to specify that a data type can be considered as being contiguous in memory.
Macros for accessing List elements.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...