template<class element_t,class hash_func=id<element_t> > class adevs_set

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)

Inheritance:


Public Methods

[more] adevs_set()
[more] adevs_set(int capacity, int grow = BAG_DEFAULT_GROW)
[more] adevs_set(const adevs_set<element_t, hash_func>& src)
[more]const adevs_set<element_t,hash_func> & operator=(const adevs_set<element_t, hash_func>& src)
[more]void add(const element_t& e)
Adds the element to the set if not already a member
[more]void remove(int index)
[more]void removeAll()
[more]bool contains(const element_t& e) const
Returns true if the element is in the set, false otherwise
[more]adevs_set<element_t,hash_func> operator-(const adevs_set<element_t, hash_func>& x) const
Set difference operator
[more] ~adevs_set()


Inherited from adevs_bag:

Public Methods

oint getSize() const
oint getCapacity() const
ovoid enlarge(int adjustment)
oelement_t& operator[](int index)
oconst element_t& get(int index) const
oelement_t& get(int index)
ovoid swap(int i, int j)
ovoid append(const adevs_bag<element_t>& src)
ovoid 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)
o adevs_set()

o adevs_set(int capacity, int grow = BAG_DEFAULT_GROW)

o adevs_set(const adevs_set<element_t, hash_func>& src)

oconst adevs_set<element_t,hash_func> & operator=(const adevs_set<element_t, hash_func>& src)

ovoid add(const element_t& e)
Adds the element to the set if not already a member

ovoid remove(int index)

ovoid removeAll()

obool contains(const element_t& e) const
Returns true if the element is in the set, false otherwise

oadevs_set<element_t,hash_func> operator-(const adevs_set<element_t, hash_func>& x) const
Set difference operator

o ~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++.