31 const CompactListList<label>&
input,
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,
114 const CompactListList<label>&
input,
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;
CompactListList< label > subsetAdjacency(const bitSet &select, const CompactListList< label > &input, labelList &subMap)
void size(const label n)
Older name for setAddressableSize.
void resize(const label len)
Adjust allocated size of list.
A range or interval of labels defined by a start and a size.
List< bool > select(const label n, const labelUList &locations)
Construct a selection list of bools (all false) with the given pre-size, subsequently add specified l...
SubList< label > subList
Declare type of subList.
bool contains(const T &val) const
True if the value is contained in the list.
Various functions to operate on Lists.
#define forAll(list, i)
Loop across all elements in list.
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
bool contains(const Key &key) const
True if hashed key is contained (found) in table.
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...
static Istream & input(Istream &is, IntRange< T > &range)
A packed storage of objects of type <T> using an offset table for access.
std::enable_if< std::is_same< bool, TypeT >::value, bool >::type test(const label i) const
Test bool value at specified position, always false for out-of-range access.
const T & lookup(const Key &key, const T &deflt) const
Return hashed entry if it exists, or return the given default.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
static Ostream & output(Ostream &os, const IntRange< T > &range)
#define forAllReverse(list, i)
Reverse loop across all elements in list.
Map< label > invertToMap(const labelUList &values)
Create inverse mapping, which is a lookup table into the given list.