mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: add bitSet found() method - method name compatibility with HashSet
This commit is contained in:
@ -244,6 +244,11 @@ public:
|
||||
// \note Method name compatibility with std::bitset
|
||||
inline bool test(const label pos) const;
|
||||
|
||||
//- Test value at specified position, never auto-vivify entries.
|
||||
//
|
||||
// \note Method name compatibility with HashSet
|
||||
inline bool found(const label pos) const;
|
||||
|
||||
//- Locate the first bit that is set.
|
||||
// \return the location or -1 if there are no bits set.
|
||||
//
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2018-2019 OpenCFD Ltd.
|
||||
Copyright (C) 2018-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -515,6 +515,12 @@ inline bool Foam::bitSet::test(const label pos) const
|
||||
}
|
||||
|
||||
|
||||
inline bool Foam::bitSet::found(const label pos) const
|
||||
{
|
||||
return get(pos);
|
||||
}
|
||||
|
||||
|
||||
inline Foam::labelList Foam::bitSet::sortedToc() const
|
||||
{
|
||||
return toc();
|
||||
|
||||
Reference in New Issue
Block a user