Unigine::HashSet Class
Header: | #include <UnigineHashSet.h> |
A hash set container template. The hash set stores keys in an unspecified order. It allows for fast lookup of the keys.
HashSet Class
Members
HashSet ( ) #
Default constructor that produces an empty hash set.HashSet ( const HashSet& o ) #
Constructor. Creates a hash set by copying a source hash set.Arguments
- const HashSet& o - Hash set.
HashSet ( HashSet&& o ) #
Constructor. Creates a hash set by copying a source hash set.Arguments
- HashSet&& o - Hash set.
HashSet ( std::initializer_list<Key> list ) #
Constructor. Creates a hash set from given list of keys.Arguments
- std::initializer_list<Key> list - List of keys.
HashSet<Key, Counter> & operator= ( const HashSet& o ) #
Assignment operator for the hash set.Arguments
- const HashSet& o - Hash set.
HashSet<Key, Counter> & operator= ( HashSet&& o ) #
Assignment operator for the hash set.Arguments
- HashSet&& o - Hash set.
void append ( const Key& key ) #
Appends a key to the hash set.Arguments
- const Key& key - Key.
void append ( Key&& key ) #
Appends a key to the hash set.Arguments
- Key&& key - Key.
void append ( const HashSet& o ) #
Appends a given hash set to the current one.Arguments
- const HashSet& o - Hash set.
void append ( HashSet&& o ) #
Appends a given hash set to the current one.Arguments
- HashSet&& o - Hash set.
void remove ( const HashSet& o ) #
Removes all keys of a given hash set from the current one.Arguments
- const HashSet& o - Hash set.
void insert ( const Key& key ) #
Inserts a key into the hash set.Arguments
- const Key& key - Key.
void insert ( Key&& key ) #
Inserts a key into the hash set.Arguments
- Key&& key - Key.
void insert ( const HashSet& o ) #
Inserts a given hash set into the current one.Arguments
- const HashSet& o - Hash set.
void insert ( HashSet&& o ) #
Inserts a given hash set into the current one.Arguments
- HashSet&& o - Hash set.
void subtract ( const HashSet& o ) #
Removes all keys of a given hash set from the current one.Arguments
- const HashSet& o - Hash set.
bool operator== ( const HashSet& o ) const#
Checks if two hash sets are equal. The hash sets are considered equal if their keys are the same.Arguments
- const HashSet& o - Hash set.
Return value
Returns 1 if sets are equal; otherwise, 0 is returned.bool operator!= ( const HashSet& o ) const#
Checks if two hash sets are not equal. The hash sets are considered equal if their keys are the same.Arguments
- const HashSet& o - Hash set.
Return value
Returns 1 if sets are not equal; otherwise, 0 is returned.HashSet<Key, Counter> & operator+= ( const Key& key ) #
Inserts a given key into the hash set and returns the updated set.Arguments
- const Key& key - Key.
Return value
Updated hash set.HashSet<Key, Counter> & operator+= ( const HashSet& o ) #
Inserts a given hash set into the current one and returns the updated set.Arguments
- const HashSet& o - Hash set.
Return value
Updated hash set.HashSet<Key, Counter> & operator-= ( const Key& key ) #
Removes a given key from the current hash set and returns the updated set.Arguments
- const Key& key - Key.
Return value
Updated hash set.HashSet<Key, Counter> & operator-= ( const HashSet& o ) #
Removes a given hash set from the current one and returns the updated set.Arguments
- const HashSet& o - Hash set.
Return value
Updated hash set.HashSet<Key, Counter> fromKeys ( const Key* keys, size_t size ) #
Appends keys to the hash set and returns the updated set.Arguments
- const Key* keys - Keys pointer.
- size_t size - Keys size.
Return value
Updated hash set.HashSet<Key, Counter> fromKeys ( const Vector<Key>& keys ) #
Appends keys to the hash set and returns the updated set.Arguments
- const Vector<Key>& keys - Vector of keys.
Return value
Updated hash set.HashSet<Key, Counter> fromKeys ( Vector<Key>& keys ) #
Appends keys to the hash set and returns the updated set.Arguments
- Vector<Key>& keys - Vector of keys.
Return value
Updated hash set.Last update:
10.03.2022
Помогите сделать статью лучше
Была ли эта статья полезной?
(или выберите слово/фразу и нажмите Ctrl+Enter