29 template<
class T,
class AccessOp>
32 const UList<T>& lists,
39 for (
const T& sub : lists)
41 *out = aop(sub).size();
49 template<
class T,
class AccessOp>
52 const UList<T>& lists,
58 for (
const T& sub : lists)
60 len += aop(sub).size();
67 template<
class AccessType,
class T,
class AccessOp>
76 for (
const T& sub : lists)
78 len += aop(sub).size();
84 for (
const T& sub : lists)
86 for (
const auto& item : aop(sub))
97 template<
class AccessType,
class T,
class AccessOp,
class OffsetOp>
108 for (
const T& sub : lists)
110 len += aop(sub).size();
114 auto out =
output.begin();
115 auto off = offsets.
begin();
118 for (
const T& sub : lists)
120 for (
const auto& item : aop(sub))
122 *out = oop(item, offset);
AccessType combine(const UList< T > &lists, AccessOp aop=accessOp< T >())
Combines sub-lists into a single list.
labelList subSizes(const IndirectListBase< T, Addr > &lists, AccessOp aop)
Return the sizes of the sub-lists.
iterator begin() noexcept
Return an iterator to begin traversing the UList.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
label sumSizes(const UList< T > &lists, AccessOp aop=accessOp< T >())
The total size of all sub-lists.
static Ostream & output(Ostream &os, const IntRange< T > &range)
List< label > labelList
A List of labels.
AccessType combineOffset(const UList< T > &lists, const labelUList &offsets, AccessOp aop, OffsetOp oop=offsetOp< T >())
Like combine but also offsets sublists based on passed sizes.