40 const auto max = std::max_element(locations.
begin(), locations.
end());
41 const label len = (
max != locations.
end() ? (1 + *
max) : 0);
48 for (label i : locations)
61 labelRange slice(
range);
80 for (
const label i : slice)
90 labelRange slice(
range);
93 for (
const label i : slice)
108 for (
const label i : locations)
172 for (
const bool b :
bools)
182 const label total(
count);
185 for (label i = 0; i < len; ++i)
190 if (++
count == total)
219 for (
const label idx : locations)
241 for (
const label idx : locations)
267 for (label idx = 0; idx < len; ++idx)
void size(const label n)
Older name for setAddressableSize.
std::enable_if< std::is_same< bool, TypeT >::value, bool >::type unset(const label i)
Unset the bool entry at specified position, always false for out-of-range access. ...
void set(const bitSet &bitset)
Set specified bits from another bitset.
void resize(const label len)
Adjust allocated size of list.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
std::enable_if< std::is_same< bool, TypeT >::value, bool >::type set(const label i, bool val=true)
A bitSet::set() method for a list of bool.
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...
void set(List< bool > &bools, const labelUList &locations)
Set the listed locations (assign 'true').
UList< label > labelUList
A UList of labels.
void unset(List< bool > &bools, const labelUList &locations)
Unset the listed locations (assign 'false').
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
bitSet & unset(const bitSet &other)
Unset (subtract) the bits specified in the other bitset, which is a set difference corresponds to the...
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
iterator begin() noexcept
Return an iterator to begin traversing the UList.
List< bool > bools(const labelHashSet &locations)
Transform the on locations to a boolList, with true for each non-negative location and false for all ...
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
List< label > sortedToc(const UList< bool > &bools)
Return the (sorted) values corresponding to 'true' entries.
static Ostream & output(Ostream &os, const IntRange< T > &range)
iterator end() noexcept
Return an iterator to end traversing the UList.
List< label > labelList
A List of labels.
bitSet create(const label n, const labelHashSet &locations, const bool on=true)
Create a bitSet with length n with the specified on locations.
List< label > toc(const UList< bool > &bools)
Return the (sorted) values corresponding to 'true' entries.
bitSet bitset(const labelHashSet &locations)
Transform the on locations to a bitSet.