restructure and add ipi texs

This commit is contained in:
2019-11-06 18:24:04 +01:00
parent e21da561fc
commit 8fd8d2a485
155 changed files with 129 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
template<class T>
typename Set<T>::Iterator Set<T>::begin() {
return DLList<T>::begin();
}
template<class T>
typename Set<T>::Iterator Set<T>::end() {
return DLList<T>::end();
}
template<class T>
bool Set<T>::empty () {
return DLList<T>::empty();
}
template<class T>
inline bool Set<T>::member (T t) {
return find(t)!=DLList<T>::end();
}
template<class T>
inline void Set<T>::insert (T t)
{
if (!member(t))
DLList<T>::insert(DLList<T>::begin(),t);
}
template<class T>
inline void Set<T>::remove (T t)
{
typename DLList<T>::Iterator i = find(t);
if (i!=DLList<T>::end())
erase(i);
}