5 #include <unordered_set>
9 /** This is the IoTSet implementation for C++
11 * @author Rahmadi Trimananda <rahmadi.trimananda @ uci.edu>
21 IoTSet(unordered_set<T> const& s);
24 typename unordered_set<T>::const_iterator find(const T& k); // Find the object
25 bool empty(); // Test is empty?
26 typename unordered_set<T>::const_iterator begin(); // Iterator
27 typename unordered_set<T>::const_iterator end(); // Iterator
28 int size(); // Set size
29 unordered_set<T> values(); // Return set contents
46 IoTSet<T>::IoTSet(const unordered_set<T>& s) {
56 IoTSet<T>::~IoTSet() {
63 * Find the object k in the set
66 typename unordered_set<T>::const_iterator IoTSet<T>::find(const T& k) {
73 * Return the "begin" iterator
76 typename unordered_set<T>::const_iterator IoTSet<T>::begin() {
83 * Return the "end" iterator
86 typename unordered_set<T>::const_iterator IoTSet<T>::end() {
93 * Return the size of the set
96 int IoTSet<T>::size() {
103 * Return a new copy of the set
106 unordered_set<T> IoTSet<T>::values() {
108 return new unordered_set<T>(set);