|
ADS
Algorithms and Data Structures
|
The interfaces of chapter 1 of Morin's book for the sets, beyond the book, as concepts of C++20 [see ADT.h for the SET of the book], and their realizations on a vector that exercise 1.6 asks for, the oracles of the tests of the faster ones: More...
#include "ADS/Contract.h"#include "ADS/Portable.h"#include <algorithm>#include <concepts>#include <cstddef>#include <functional>#include <utility>#include <vector>#include "ADS/set/impl/SetInterfaces.tpp"Go to the source code of this file.
Classes | |
| class | ADS::ArrayUSet< T, Eq > |
| a USet on a vector in no order, the items equal by Eq More... | |
| class | ADS::ArraySSet< T, C > |
| an SSet on a sorted vector, ordered by C More... | |
Namespaces | |
| namespace | ADS |
Concepts | |
| concept | ADS::USet |
| the unordered set of Morin, whose find() gives the item equal to the one asked | |
| concept | ADS::SSet |
| the sorted set of Morin, a USet with the successor search | |
| concept | ADS::KeyedDictionary |
| a dictionary that gives the address of the key equal to the one asked, on which DictionarySet is a USet; the search may change the dictionary (a splay tree), not the set of its keys | |
| concept | ADS::OrderedDictionary |
| a KeyedDictionary that gives the address of the smallest key not smaller than the one asked, on which DictionarySet is an SSet | |
The interfaces of chapter 1 of Morin's book for the sets, beyond the book, as concepts of C++20 [see ADT.h for the SET of the book], and their realizations on a vector that exercise 1.6 asks for, the oracles of the tests of the faster ones:
The contracts [see Contract.h]: after insert() the item is there and after remove() it is not; the invariant of ArraySSet is the strict order of its vector, an \( O( n ) \) check. The operations are defined in SetInterfaces.tpp.