1. Creation
| MSetBase<Item,Impl> | ms; |
| MSetBase<Item,Impl> | ms( (Collection<Item>&) c); |
| MSetBase<Item,Impl> | ms( (MSetBase<Item,Impl>&) m); |
| MSet<Item> | ms; |
| MSet<Item> | ms( (Collection<Item>&) c); |
| MSet<Item> | ms( (MSet<Item>&) m); |
2. Operations
| virtual | ~MSetBase<Item,Impl> () |
store). O(1).
If the count reaches 0, delete the object. O(n)
| int | size () const; |
| Bool | emptyQ () const; |
| Bool | fullQ () const; |
| Bool | memberQ (const Item&e) const; |
| Bool | sortedQ (const Item&e) const; |
store is stored
(call store
| DataType | type () const; |
| Item | first () const; |
store
(call store
| Item | last () const; |
store
(call store
| void | insert (Item e); |
store is greater
than 1, then other collection objects are also
using
it as their implementation. Rather than changing
its contents, a copy will be made (O(n)),
and the reference
counts will be updated. Finally,
Call store
| void | append (Item e); |
| void | remove (Item e); |
store.
| void | clear (); |
store.
| int | iterate (Iterator<Item>& it, Item& e) const; |
| Item | ref (int i); |
| int | rank (Item it); |
| int | occurrences (Item); |
| int | permutationQ (); |
store is a sorted Container.
O(n2) otherwise.
| void | concatenate (const Collection<Item>&); |
| ostream& | display (ostream&os); |
| Bool operator==(const Collection<Item>&) const; | |
| Bool operator<=(const Collection<Item>&) const; | |
| Bool operator< (const Collection<Item>&) const; | |
| Bool operator>=(const Collection<Item>&) const; | |
| Bool operator> (const Collection<Item>&) const; | |
| Bool operator!=(const Collection<Item>&) const; | |
| Bool operator==(const Container<Item>&) const; | |
| Bool operator<=(const Container<Item>&) const; | |
| Bool operator< (const Container<Item>&) const; | |
| Bool operator>=(const Container<Item>&) const; | |
| Bool operator> (const Container<Item>&) const; | |
| Bool operator!=(const Container<Item>&) const; |
| Bool | eq (const MSetBase<Item,Impl>&s); |
operator==(...) is provided
for access from the TCL interface.
| Bool | neq (const MSetBase<Item,Impl>&s); |
operator!=(...) is provided
for access from the TCL interface.
| MSetBase<Item,Impl> unions(Collection<Item>& c); | |
| MSetBase<Item,Impl> operator+(Collection<Item>& c); |
| MSetBase<Item,Impl> intersection(Collection<Item>& c); | |
| MSetBase<Item,Impl> operator^(Collection<Item>& c); |
| MSetBase<Item,Impl> difference(Collection<Item>& c); | |
| MSetBase<Item,Impl> operator-(Collection<Item>& c); |
| Bool | subsetQ (Collection<Item>& c); |
| Bool | properSubsetQ (Collection<Item>& c); |
| int | occurrences (Item item); |
| ostream& | display (ostream& os) const |
| Collection<Item>* | newEmpty() const; |