39 lookup_(
std::move(list.lookup_))
73 template<
class AnyType,
class AnyHash>
102 if (lookup_.insert(val, size()))
116 const label lenHash = lookup_.size();
118 if ((lenList < lenHash) || (lenList && !lenHash))
135 return lookup().contains(val);
147 lookup_.swap(list.lookup_);
154 lookup_.transfer(list.lookup_);
187 inline const Foam::word& Foam::hashedWordList::operator[]
198 return lookup_.lookup(val, -1);
204 return lookup_.contains(val);
232 lookup_ = std::move(list.lookup_);
void swap(UList< T > &list) noexcept
Swap content with another UList of the same type in constant time.
void transfer(List< word > &list)
Transfer the contents of the argument List into this list and annul the argument list.
lookup(const dictionary &dict, const polyPatch &pp)
Construct from components.
void rehash() const
Rebuild the lookup hash indices.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
bool contains(const word &val) const
Is the value contained in the list (searches the hash).
Lookup type of boundary radiation properties.
void push_back(const word &val)
Append an element at the end of the list.
const word & operator[](const label index) const
Return name corresponding to specified index.
T & operator[](const label i)
Return element of UList.
void sort()
Inplace sort list and rehash the indices.
hashedWordList()=default
Default construct an empty list.
void operator=(const UList< word > &list)
Assignment to UList operator. Takes linear time.
void clear()
Clear the list, i.e. set size to zero.
A class for handling words, derived from Foam::string.
void sort(UList< T > &list)
Sort the list.
Istream & operator>>(Istream &, directionInfo &)
label push_uniq(const word &val)
Append an element if not already in the list.
bool operator()(const word &val) const
Check hashed values for the specified name - same as contains().
A HashTable similar to std::unordered_map.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void operator=(const hashedWordList &list)
Copy assignment. Rehashes the indices.
label size() const noexcept
The number of elements in the container.
void clear()
Clear the list, i.e. set size to zero.
const HashTable< label > & lookup() const
Return the hash of words/indices for inspection.
List< word > wordList
List of word.
A wordList with hashed named lookup, which can be faster in some situations than using the normal lis...
List< label > sortedToc(const UList< bool > &bools)
Return the (sorted) values corresponding to 'true' entries.
void transfer(hashedWordList &list)
Transfer contents of the argument into this list and annul the argument list, optionally eliminating ...
void swap(hashedWordList &list)
Swap contents.
label find(const word &val) const
Find index of the value (searches the hash).