#include <SetDistinct_Type.h>
Inheritance diagram for SetDistinct(Type)::

Public Methods | |
| SetDistinct(Type) () | |
| SetDistinct(Type) (const SetDistinct(Type) &set) | |
| ~SetDistinct(Type) () | |
| bool | add (Type &object) |
| bool | remove (Type &object) |
| int | getNoMembers () const |
| bool | member (const Type &object) const |
| void | copy (const SetDistinct(Type) &set) |
| Type& | getMember (int i) |
| const Type& | getMember (int i) const |
| Type& | operator() (int i) |
| const Type& | operator() (int i) const |
| SetDistinct(Type)& | operator= (const SetDistinct(Type) &set) |
| void | heapsort () |
| void | sort () |
| void | remove () |
| void | convert2vector (VecSimplest(Type) &v) const |
| void | print (Os os) const |
| void | scan (Is is, char startmark='\0', char sepmark='', char endmark=';') |
Friends | |
| Os& | operator<< (Os &os, const SetDistinct(Type) &x) |
| Is& | operator>> (Is &is, SetDistinct(Type) &x) |
NAME: SetDistinct - a template class for distinct sets
DESCRIPTION:
Class "SetDistinct" offers sets without mutiple entries(Distinct Set).
|
|
The only constructor creates an empty set. The member function "add" are used to add new members into the set. Every new member is added at the end of the set. |
|
|
See documentation of one of the overloaded constructor. |
|
|
|
|
|
adds a new member into the set. If the member does not exit, add it into the set and return "true"; if the member already exits, then just return "false". |
|
|
copies the content of the set into a vector "VecSimplest(Type)". |
|
|
|
|
|
See documentation of one of the overloaded functions. |
|
|
returns the member in a given position in the set. |
|
|
returns the number of members in the set. |
|
|
|
|
|
check if a given object is part of the set. |
|
|
|
|
|
|
|
|
|
|
|
prints the set. |
|
|
See documentation of one of the overloaded functions. |
|
|
See documentation of one of the overloaded functions. |
|
|
|
|
|
|
|
|
|
|
|
|