36 subMap = select.sortedToc();
42 const label nTotal = input.
size();
46 if (subMap[i] < nTotal)
66 for (
const label nbr : input[subMap[idx]])
93 for (
const label nbr : input[subMap[idx]])
98 && (newNbr = reverseMap.
lookup(nbr, -1)) >= 0
101 values[sizes[idx]++] = newNbr;
113 const labelRange& slice,
130 for (
const label nbr : input[subMap[idx]])
149 const label localOffset = select.start();
153 for (
const label nbr : input[subMap[idx]])
157 values[sizes[idx]++] = nbr - localOffset;
Various functions to operate on Lists.
A packed storage of objects of type <T> using an offset table for access.
const labelList & offsets() const noexcept
Return the offset table (= size()+1).
const List< T > & values() const noexcept
Return the packed values.
label size() const noexcept
The primary size (the number of rows/sublists).
const T & lookup(const Key &key, const T &deflt) const
Return hashed entry if it exists, or return the given default.
bool contains(const Key &key) const
True if hashed key is contained (found) in table.
void resize(const label len)
Adjust allocated size of list.
A HashTable to objects of type <T> with a label key.
bool test(const label i) const
Test bool value at specified position, always false for out-of-range access.
bool contains(const T &val) const
True if the value is contained in the list.
void size(const label n)
Older name for setAddressableSize.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
A range or interval of labels defined by a start and a size.
labelRange subset0(label len) const
Calculate the intersection with the given 0/size range.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
Map< label > invertToMap(const labelUList &values)
Create inverse mapping, which is a lookup table into the given list.
List< label > labelList
A List of labels.
CompactListList< label > subsetAdjacency(const bitSet &select, const CompactListList< label > &input, labelList &subMap)
labelList identity(const label len, label start=0)
Return an identity map of the given length with (map[i] == i), works like std::iota() but returning a...
#define forAll(list, i)
Loop across all elements in list.
#define forAllReverse(list, i)
Reverse loop across all elements in list.