#include <UniqueSortedArray.h>
Inheritance diagram for UniqueSortedArray< Elem >:

Public Member Functions | |
| UniqueSortedArray (int s=0) | |
| UniqueSortedArray (UniqueSortedArray< Elem > &ua) | |
| UniqueSortedArray (SortedArray< Elem > &sa) | |
| UniqueSortedArray< Elem > & | operator= (UniqueSortedArray< Elem > &ua) |
| UniqueSortedArray< Elem > & | operator= (SortedArray< Elem > &sa) |
| int | add (const Elem &elem) |
| int | insert (const Elem &elem) |
Definition at line 12 of file UniqueSortedArray.h.
|
||||||||||
|
Definition at line 16 of file UniqueSortedArray.h. 00016 : SortedArray<Elem>(s) { }
|
|
||||||||||
|
Definition at line 18 of file UniqueSortedArray.h. 00018 : 00019 SortedArray<Elem>(ua) { }
|
|
||||||||||
|
Definition at line 21 of file UniqueSortedArray.h. 00021 : SortedArray<Elem>(sa) { 00022 this->uniq(); 00023 }
|
|
||||||||||
|
Reimplemented from SortedArray< Elem >. Definition at line 50 of file UniqueSortedArray.h. Referenced by GlobalMasterIMD::get_vmd_forces(), and ComputeHomePatches::initialize(). 00050 { return(insert(elem)); }
|
|
||||||||||
|
Reimplemented from SortedArray< Elem >. Definition at line 58 of file UniqueSortedArray.h. References SortedArray< Elem >::bsearch(), ResizeArray< Elem >::insert(), and ResizeArray< Elem >::size(). Referenced by UniqueSortedArray< PatchElem >::add(). 00058 {
00059 this->found = this->bsearch(elem);
00060 if (this->found == -1) {
00061 return ResizeArray<Elem>::insert(elem, 0);
00062 }
00063 if (this->found < this->size() && (*(this->rep))[this->found] == elem) {
00064 return -2;
00065 }
00066 if (this->found == (this->size()-1) && (*(this->rep))[this->found] < elem) {
00067 return ResizeArray<Elem>::insert(elem, this->size());
00068 } else {
00069 return ResizeArray<Elem>::insert(elem, this->found);
00070 }
00071 }
|
|
||||||||||
|
Reimplemented from SortedArray< Elem >. Definition at line 36 of file UniqueSortedArray.h. 00036 {
00037 SortedArray<Elem>::operator=(sa);
00038 this->uniq();
00039 return(*this);
00040 }
|
|
||||||||||
|
Definition at line 31 of file UniqueSortedArray.h. 00031 {
00032 SortedArray<Elem>::operator=(ua);
00033 return(*this);
00034 }
|
1.3.9.1