template<class element_t,class hash_func=id<element_t> > class adevs_set
A set can contain a single instance of an element.
Inheritance:
Public Methods
-
adevs_set()
-
adevs_set(int capacity, int grow = BAG_DEFAULT_GROW)
-
adevs_set(const adevs_set<element_t, hash_func>& src)
-
const adevs_set<element_t,hash_func> & operator=(const adevs_set<element_t, hash_func>& src)
-
void add(const element_t& e)
- Adds the element to the set if not already a member
-
void remove(int index)
-
void removeAll()
-
bool contains(const element_t& e) const
- Returns true if the element is in the set, false otherwise
-
adevs_set<element_t,hash_func> operator-(const adevs_set<element_t, hash_func>& x) const
- Set difference operator
-
~adevs_set()
Public Methods
-
int getSize() const
-
int getCapacity() const
-
void enlarge(int adjustment)
-
element_t& operator[](int index)
-
const element_t& get(int index) const
-
void swap(int i, int j)
-
void append(const adevs_bag<element_t>& src)
-
void erase(const element_t& e)
Documentation
A set can contain a single instance of an element.
A hashing function must be provided that operates on the
element type (default is to use the id() function).
adevs_set()
adevs_set(int capacity, int grow = BAG_DEFAULT_GROW)
adevs_set(const adevs_set<element_t, hash_func>& src)
const adevs_set<element_t,hash_func> & operator=(const adevs_set<element_t, hash_func>& src)
void add(const element_t& e)
- Adds the element to the set if not already a member
void remove(int index)
void removeAll()
bool contains(const element_t& e) const
- Returns true if the element is in the set, false otherwise
adevs_set<element_t,hash_func> operator-(const adevs_set<element_t, hash_func>& x) const
- Set difference operator
~adevs_set()
- This class has no child classes.
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.