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()
Default constructor.
[more] adevs_set(int capacity)
Creates a set with a specified initial capacity and capacity increment value
[more] adevs_set(const adevs_set<element_t, hash_func>& src)
Copy constructor.
[more]const adevs_set<element_t,hash_func> & operator=(const adevs_set<element_t, hash_func>& src)
Assignment operator.
[more]void add(const element_t& e)
Adds the element to the set if it is not already a member of the set
[more]void remove(int index)
Removes the element at the specified index
[more]void removeAll()
Removes all of the elements from the set
[more]bool contains(const element_t& e) const
Returns true if the element is in the set, and 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<element_t,hash_func> intersection(const adevs_set<element_t, hash_func>& x) const
Compute the intersection of this and another set
[more] ~adevs_set()
Destructor


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()
Default constructor. Creates an empty set.

o adevs_set(int capacity)
Creates a set with a specified initial capacity and capacity increment value

o adevs_set(const adevs_set<element_t, hash_func>& src)
Copy constructor. Elements are copied using the assignment operator and copy constructor.

oconst adevs_set<element_t,hash_func> & operator=(const adevs_set<element_t, hash_func>& src)
Assignment operator. Elements are copied using the assignment operator and copy constructor.

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

ovoid remove(int index)
Removes the element at the specified index

ovoid removeAll()
Removes all of the elements from the set

obool contains(const element_t& e) const
Returns true if the element is in the set, and false otherwise. Equality is determined using the == operator.

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

oadevs_set<element_t,hash_func> intersection(const adevs_set<element_t, hash_func>& x) const
Compute the intersection of this and another set

o ~adevs_set()
Destructor


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.