Go to the documentation of this file.
45 <<
"bad size " << newSize
49 if (newSize != this->size_)
53 T* nv =
new T[newSize];
60 if (is_contiguous<T>::value)
64 static_cast<void*
>(nv), this->v_,
overlap*
sizeof(
T)
74 nv[i] = std::move(vp[i]);
80 this->size_ = newSize;
101 <<
"bad size " << len
117 <<
"bad size " << len
126 for (
label i=0; i < len; ++i)
142 <<
"bad size " << len
151 for (
label i=0; i < len; ++i)
173 this->v_[0] = std::move(
val);
189 UList<
T>(nullptr, a.size_)
191 const label len = this->size_;
202 static_cast<void*
>(this->v_), a.v_, this->byteSize()
210 for (
label i = 0; i < len; ++i)
222 UList<
T>(nullptr, a.size_)
224 const label len = this->size_;
235 static_cast<void*
>(this->v_), a.v_, this->byteSize()
243 for (
label i = 0; i < len; ++i)
255 UList<
T>(nullptr, a.size_)
266 const label len = this->size_;
277 static_cast<void*
>(this->v_), a.v_, this->byteSize()
285 for (
label i = 0; i < len; ++i)
297 UList<
T>(nullptr, mapAddressing.size())
307 for (
label i=0; i < len; ++i)
309 vp[i] = list[mapAddressing[i]];
316 template<
class InputIterator>
337 UList<
T>(nullptr, list.size())
355 UList<
T>(nullptr, list.size())
380 template<
int SizeMin>
403 operator=(std::move(list));
424 const label oldSize = this->size_;
425 this->doResize(newSize);
428 for (
label i = oldSize; i < newSize; ++i)
445 this->size_ = list.size_;
454 template<
int SizeMin>
459 transfer(
static_cast<List<T>&
>(list));
471 transfer(
static_cast<List<T>&
>(list));
487 const label len = this->size_;
496 static_cast<void*
>(this->v_), a.v_, this->byteSize()
504 for (
label i = 0; i < len; ++i)
521 operator=(
static_cast<const UList<T>&
>(list));
528 const label len = list.size();
537 for (
auto iter = list.
cbegin(); iter != list.
cend(); ++iter)
558 for (
label i=0; i < len; ++i)
569 const label len = list.size();
578 for (
const T&
val : list)
600 template<
int SizeMin>
617 const label len = list.size();
625 for (
label i = 0; i < len; ++i)
627 vp[i] = std::move(list.removeHead());
label ListType::const_reference val
constexpr auto begin(C &c) -> decltype(c.begin())
Return iterator to the beginning of the container c.
static constexpr const zero Zero
Global zero.
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), which can be used to avoid manipulating objects that are...
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.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
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.
void resize(const label newSize)
Adjust allocated size of list.
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.
errorManip< error > abort(error &err)
constexpr List() noexcept
Null constructor.
scalar distance(const vector &p1, const vector &p2)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define List_CONST_ACCESS(type, f, fp)
Non-intrusive singly-linked list.
const const_iterator & cend() const
End of list for forward iterators.
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.
void size(const label n) noexcept
Override size to be inconsistent with allocated storage.
const_iterator cbegin() const
Iterator to first item in list with const access.
Base for lists with indirect addressing, templated on the list contents type and the addressing type....
const cellCellStencilObject & overlap
const Vector< label > N(dict.get< Vector< label >>("N"))
#define List_ACCESS(type, f, fp)
label size() const
The number of elements in the list.
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), which can be used to avoid manipulating objects that ar...