41 for (label i = select.find_first(); i >= 0; i = select.find_next(i))
58 for (label i = 0; i < len; ++i)
73 output.
setMany(locations.begin(), locations.end());
81 auto const max = std::max_element(locations.
begin(), locations.
end());
82 const label len = (
max != locations.
end() ? (1 + *
max) : 0);
89 List<bool> output(len,
false);
91 for (
const label i : locations)
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
void reserve(label numEntries)
Reserve space for at least the specified number of elements (not the number of buckets) and regenerat...
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>, where the size of the vector is known and can be used for subscri...
bool any() const
True if any entries are 'true'.
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...
label setMany(InputIter first, InputIter last)
Set the locations listed by the iterator range, auto-vivify entries if needed.
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...
labelHashSet used(const bitSet &select)
Convert a bitset to a labelHashSet of the indices used.
bitSet bitset(const labelHashSet &locations)
Transform the on locations to a bitSet.
List< bool > bools(const labelHashSet &locations)
Transform the on locations to a boolList, with true for each non-negative location and false for all ...
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.